Message-ID: <20160524172946.Horde.9MStmdO36AbpWPdncFqmLKi@mail.sapo.pt>
Date: 2016-05-24T16:29:46Z
From: Rui Barradas
Subject: Factor Variable frequency
In-Reply-To: <137597854.3222674.1464105256516.JavaMail.yahoo@mail.yahoo.com>
Hello,
Maybe the following (untested).
table(df$Protocol[df$Speed == "SLOW"])
Hope this helps,
Rui Barradas
?
Citando ch.elahe via R-help <r-help at r-project.org>:
> 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? ? ? ? ?: chr? "SLOW" "SLOW" "SLOW" "VerySLOW" ...
> How can I get the most frequent Protocol when Speed is "SLOW"?
> Thanks for any help!
> Elahe
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.htmland provide commented,
> minimal, self-contained, reproducible code.
?
[[alternative HTML version deleted]]