[R-sig-QA] create groups based upon different levels of 4 factors
Mary A. Marion
mmstat at comcast.net
Fri Nov 28 18:33:38 CET 2008
Hello to the R gurus,
My data is bound in a dataframe.
data2<-cbind.data.frame(digrp,gender, agegrp, bmigrp,wt)
data2[1:5,]
I want to create groups based upon different levels of 4 factors
ind<- as.logical ( (digrp=1) & (gender=1) & (agegrp="[20-35)") &
(bmigrp="[0,18.5)" ) );
Error in (digrp = 1) & (gender = 1) & (agegrp = "[20-35)") :
operations are possible only for numeric or logical types
>
I keep getting an error message. How do I see that the above statement
is in correct type format?
#operations are possible only for numeric or logical types. why does
it not include bmigrp?
Thanks.
Sincerely,
Mary A. Marion
More information about the R-sig-QA
mailing list