[R] Help with IF command strings
smartpink111 at yahoo.com
Fri Jul 12 03:21:01 CEST 2013
I have data in 26 columns, I'm trying to get a mean for column 21 only for the participants that are either 0 or 1 in column 2.
One of the commands I tried looked something like this
mean(data1$V21, if(V2 = 1))
So basically I need to have the program run a mean (and later
other forms of analysis) on participants based on their condition.
either 0 or 1.
Help is greatly appreciated.
More information about the R-help