Re: [R] Factor Variable frequency

2016-05-25 Thread S Ellison
> ruipbarra...@sapo.pt > Maybe the following (untested). > > table(df$Protocol[df$Speed == "SLOW"]) Could also use which.max to get the particular item: ... tprot <- table(df$Protocol[df$Speed == "SLOW"]) tprot[which.max(tprot)] S Ellison *

Re: [R] Factor Variable frequency

2016-05-24 Thread ruipbarradas
Hello, Maybe the following (untested). table(df$Protocol[df$Speed == "SLOW"]) Hope this helps, Rui Barradas   Citando ch.elahe via R-help : > Hi all, > I have the following df: > >    $ Protocol       : Factor w/ 48 levels "DP FS QTSE SAG",..: 2 3 > 43 42 31 36 37 30 28 5 ... > >    $ Speed