Re: [R] request: a class having max frequency

2008-06-07 Thread Jim Lemon
Muhammad Azam wrote: Dear R users I have a very basic question. I tried but could not find the required result. using dat <- pima f <- table(dat[,9]) f 0 1 500 268 i want to find that class say "0" having maximum frequency i.e 500. I used which.max(f) which provide 0 1 How c

Re: [R] request: a class having max frequency

2008-06-06 Thread Chuck Cleland
On 6/6/2008 9:18 AM, Chuck Cleland wrote: On 6/6/2008 9:14 AM, Muhammad Azam wrote: Dear R users I have a very basic question. I tried but could not find the required result. using dat <- pima f <- table(dat[,9]) f 0 1 500 268 i want to find that class say "0" having maximum frequency

Re: [R] request: a class having max frequency

2008-06-06 Thread Daniel Folkinshteyn
names(f)[which.max(f)] on 06/06/2008 09:14 AM Muhammad Azam said the following: Dear R users I have a very basic question. I tried but could not find the required result. using dat <- pima f <- table(dat[,9]) f 0 1 500 268 i want to find that class say "0" having maximum frequency i.e

Re: [R] request: a class having max frequency

2008-06-06 Thread Michael Conklin
your system. Thank you for your cooperation. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muhammad Azam Sent: Friday, June 06, 2008 8:15 AM To: R Help; R-help request Subject: [R] request: a class having max frequency Dear R users I have a very

Re: [R] request: a class having max frequency

2008-06-06 Thread Chuck Cleland
On 6/6/2008 9:14 AM, Muhammad Azam wrote: Dear R users I have a very basic question. I tried but could not find the required result. using dat <- pima f <- table(dat[,9]) f 0 1 500 268 i want to find that class say "0" having maximum frequency i.e 500. I used which.max(f) which provid

[R] request: a class having max frequency

2008-06-06 Thread Muhammad Azam
Dear R users I have a very basic question. I tried but could not find the required result. using dat <- pima f <- table(dat[,9]) > f 0 1 500 268 i want to find that class say "0" having maximum frequency i.e 500. I used >which.max(f) which provide 0 1 How can i get only the "0". Than