> x <- runif(10, 0, 1)
> x2 <- x > 0.5
> x2
[1] TRUE TRUE FALSE FALSE FALSE TRUE TRUE FALSE TRUE FALSE
> table(x2)
x2
FALSE TRUE
5 5
On Wed, Dec 9, 2009 at 6:36 PM, BIGBEEF <[email protected]> wrote:
>
> Hi - I'm having difficulty with frequencies in R. I have a table with a
> variable (column) called "difference" 600 observations (rows). I would like
> to know how many values are < -0.5 as well as how many are > 0.5. The rest
> are obviously in the middle.
>
> In SAS I could this immediately but am unable to do it in R.
>
> Thanks for your help.
> --
> View this message in context:
> http://n4.nabble.com/Counting-Frequencies-tp956556p956556.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
==============================
WenSui Liu
Blog : statcompute.spaces.live.com
Tough Times Never Last. But Tough People Do. - Robert Schuller
==============================
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.