Re: [R] Creating a loop with code from the mblm package

2016-09-04 Thread Bert Gunter
Please go through an R tutorial or two before posting further here. There are many good ones on the web. Some recommendations can be found here: https://www.rstudio.com/online-learning/ Your question: "And my Year column is the first column in my csv file, which I thought made it column 0. Am I

Re: [R] Creating a loop with code from the mblm package

2016-09-04 Thread Jim Lemon
Hi Bailey, Treat it as a guess, but try this: for (i in c(1:3)){ y<-mydata[,i] x <- mblm(y ~ Year, mydata, repeated = FALSE) print(x) } I'm not sure that you can mix indexed columns with column names. Also, Year is column 4, no? Jim On Sun, Sep 4, 2016 at 11:43 AM, Bailey Hewitt