search for: vocallgp4

Displaying 1 result from an estimated 1 matches for "vocallgp4".

Did you mean: vocallgp1
2009 Dec 10
1
Need help creating multiple datasets using loops or vectorization
I am trying to create multiple dataset by group like the following using either a loop or vectorization: vocallGp1<-subset(vocallsub, Group==1) vocallGp2<-subset(vocallsub, Group==2) vocallGp3<-subset(vocallsub, Group==3) vocallGp4<-subset(vocallsub, Group==4) vocallGp5<-subset(vocallsub, Group==5) When I create the loop I get the following error: vocallsub<-vocall[c("PatientID","Group")] > > for(i in 1:length(vocallsub$Group)){vocallGrp[i]<-subset(vocallsub, Group==(i))} Error in voca...