CG Pettersson <cg.petters...@lantmannen.com> writes: >> frame1 <- data.frame(gushVM, I(n96))
[...] >> pls1 <- plsr(gushVM ~ n96, data = frame1) > Error in model.frame.default(formula = gushVM ~ n96, data = frame1) : > invalid type (list) for variable 'n96' As far as I can remember, you get this error if the n96 object was a data.frame instead of a matrix. Can you check with, e.g., > class(n96) If it says "data.frame", try using I(as.matrix(n96)). -- Regards, Bjørn-Helge Mevik ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.