Hi

I am attempting to do a loadings plot from a plsr object. I have managed to do 
this using the gasoline data that comes with the pls package. However when I 
conduct this on my dataset i get the following error message. 


>plot(BHPLS1, "loadings", comps = 1:2, legendpos = "topleft", labels = 
>"numbers", 
>xlab = "nm")

Error in loadingplot.default(x, ...) : 
  Could not convert variable names to numbers.


 str(BHPLS1_Loadings)
 loadings [1:8892, 1:60] -0.00717 0.00414 0.02611 0.00468 -0.00676 ...
 - attr(*, "dimnames")=List of 2
  ..$ : chr [1:8892] "PCIList1" "PCIList2" "PCIList3" "PCIList4" ...
  ..$ : chr [1:60] "Comp 1" "Comp 2" "Comp 3" "Comp 4" ...
 - attr(*, "explvar")= Named num [1:60] 2.67 4.14 4.41 3.55 2.59 ...
  ..- attr(*, "names")= chr [1:60] "Comp 1" "Comp 2" "Comp 3" "Comp 4" ...

Can anyone see the problem??

        [[alternative HTML version deleted]]

______________________________________________
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