Hi Jacy,
I'll take my chances answering your question.
I'd suggest using the paste() function and then transforming the string
into a formula object:
my.formula =
as.formula(paste("y~x1+x2+",paste(colnames(REG)[2:num],collapse="+"),
sep= "")) ;
aov(my.formula,data=REG) ;
The first line
I'm creating an ANOVA model. Is there a way to pull in consecutive columns of
variables for the test?
Example: aov1<-aov(y~x1+x2+REG[,2:num], data=REG)
I'm not looking for interaction effects, I just want to create a model for the
first few columns of variables (exact number and names will var
2 matches
Mail list logo