Displaying 1 result from an estimated 1 matches for "gvlmafa".
Did you mean:
gvlma
2014 Apr 21
3
Loops (run the same function per different columns)
...same function 34 times with a different fatty acid each time). I saw that people do similar things with loops but I cannot get them to work.
I have tried the script below but it does not work.
y<-c("C14.0","C15.0","C16.0")
for (i in y) {
FA.ml=lm(i~Sample,data=FA)
gvlmaFA<-gvlma(FA.ml)
gvlmaFA
}
I really appreciate if someone can give me a hand with that. I know would have been finished if I had typed the 34 fatty acids but I want to learn how to do it with loops.
Cheers