All,

I am working with NIR spectral data and it was great to find that the example 
in ?plsr also used spectral data.  Unfortunately, I am having difficulty 
figuring out how the "yarn" dataset is structured to allow for the plsr model 
to read: 

library(pls)
data(yard)
yarn.oscorespls <- mvr(density ~ NIR, 6, data = yarn, validation = "CV", method 
= "oscorespls")

dim(yarn)

yarn


Specifically, it is VERY convenient to be able to have the ~256 variables to be 
used in the model defined by NIR term.  When I use dim(yarn) it claims [1] 28  
3.  When I call "yarn" there is WAY more data than 28  3.  How does this work?  
I have 186 spectral bands to run in plsr and I would really like to be able to 
call them using NIR or something simlar.  I have tried labeling my spectral 
data ASD.###, where ### is the wavelength, but I keep getting data.frame errors.

Ross



*******************************************************************
Ross Bricklemyer
Dept. of Crop and Soil Sciences
Washington State University
291D Johnson Hall
PO Box 646420
Pullman, WA 99164-6420
Work: 509.335.3661
Cell/Home: 406.570.8576
Fax: 509.335.8674
Email: [EMAIL PROTECTED]

 

______________________________________________
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.

Reply via email to