[R] Dataframes in PLS package

Kazuo Ishii freeparis2 at gmail.com
Sun Mar 4 07:56:24 CET 2012


2012/3/4, westland <westland at uic.edu>:
> I am still/again having trouble getting PLSR to recognize the input data
> frames.   Here is what I have done:
>
>  I read in an 10000 x 8 table of data to 'pls'
>
> assign the first four columns to  matrix 'dep' and the second four to matrix
> 'ind' with the following commands:
>
> dep <- pls[,1:4]
> ind <- pls[,5:8]
>
> I create the data.frame 'eqn' :
>
> eqn <- data.frame(depy = I(as.matrix(dep)), indx = I(as.matrix(ind)))

please, type as below, after you make egn:

attach(egn)


I think it work well.

>
> And run the PLSR package
>
> apls <- plsr(depy ~ indx, data=eqn)
>
> I seem to be getting either one of two error messages:
>
> [12] ERROR:
>   invalid type (list) for variable 'dep'
> [13] ERROR:
>   object of type 'closure' is not subsettable
>
> I'm sure now that this is a problem in my creation of data.frames, but can't
> seem to find anything that describes the problem
>
>
> -----
> J. Christopher Westland
> Professor, Information & Decision Sciences, University of Illinois - Chicago
> 601 S. Morgan Street (UH2400) Chicago, IL    60607-7124
> Telephone       +1.312.860.0587
> Google Voice  +1.209.757.8849
> westland at uic.edu
> http://uic.edu/~westland
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Dataframes-in-PLS-package-tp4405798p4442436.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
>


-- 
Kazuo Ishii, Ph.D., Professor of Genome Science,
Tokyo University of Agriculture and Technology
3-5-8 Saiwai-cho, Fuchu, Tokyo 183-8509, JAPAN
Email: kishii at cc.tuat.ac.jp



More information about the R-help mailing list