[R] How to get the n (number of observations) per conditional group
John Kane
jrkrideau at yahoo.ca
Thu Aug 13 19:14:22 CEST 2009
?length
--- On Thu, 8/13/09, Dax <rienk.doetjes at gmail.com> wrote:
> From: Dax <rienk.doetjes at gmail.com>
> Subject: [R] How to get the n (number of observations) per conditional group
> To: r-help at r-project.org
> Received: Thursday, August 13, 2009, 10:11 AM
> Hello all,
>
> I have a huge data set that I'm cleaning up a bit. I am
> extracted the
> means per condition, but also need to get the n. Strangely
> enough I am
> unable to find a function that could actually pull this
> off. I am
> unable to use replications or count the rows using nrow.
>
> What I am trying to obtain is the number of observations
> fitting
> something along the lines of
> "data$total[data$spp==1&data$gyro==1&data
> $salinity==0&data$day==i]"
>
> Can anyone help me?
>
> ______________________________________________
> R-help at r-project.org
> 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.
>
__________________________________________________________________
[[elided Yahoo spam]]
More information about the R-help
mailing list