Gavin Simpson wrote: > On Mon, 2007-11-26 at 09:25 -0800, Bricklemyer, Ross S wrote: >> >> > libs.IC.cal <- mvr(libs.IC.fmla, data = libsdata.cond.cal, >> ncomp=20,validation = "LOO", method = "oscorespls") >> >> Error in colMeans(x, n, prod(dn), na.rm) : >> 'x' must be numeric >> >> There are many "0" for this soil property. Could this cause the >> error? > > Without having the data (or a small example therefore) it is impossible > to tell.
It would also be nice to know which version of the package you are using. :-) > To start, try str(libsdata.cond.cal) and check that the variables > referenced in your formula object (which is what I presume libs.IC.fmla > is?) are all numeric and haven't got coded as factors or characters or > something strange. Actually, as of version 2.0-0, mvr() etal should cope with factors without problems. They will be coded just as in lm(). Another thing to try is to say traceback() just after receiving the error message. That might tell you more about _where_ the error occurred. -- Bjørn-Helge Mevik ______________________________________________ R-help@r-project.org mailing list 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.