Hi When I call for the loadings of my plsr using the command,
x <- loadings(BHPLS1) my loadings contain variable names rather than numbers. >str(x) loadings [1:94727, 1:10] -0.00113 -0.03001 -0.00059 -0.00734 -0.02969 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:94727] "PCIList1" "PCIList2" "PCIList3" "PCIList4" ... ..$ : chr [1:10] "Comp 1" "Comp 2" "Comp 3" "Comp 4" ... - attr(*, "explvar")= Named num [1:10] 14.57 6.62 7.59 5.91 3.26 ... ..- attr(*, "names")= chr [1:10] "Comp 1" "Comp 2" "Comp 3" "Comp 4" ... Here is the structure of teh data used to conduct plsr >str(PLSdata) 'data.frame': 40 obs. of 2 variables: $ GroupingList: int 1 1 1 1 1 1 1 1 1 1 ... $ PCIList : AsIs [1:40, 1:94727] 42.01749.... 40.85915.... 65.01948.... 55.98204.... 61.71673.... ... ..- attr(*, "dimnames")=List of 2 .. ..$ : chr "X" "X.1" "X.12" "X.13" ... .. ..$ : NULL Because of this I am not able to do a loadings plot >plot(BHPLS1, "loadings", comps = 1:2, legendpos = "topleft", labels = >"numbers", >xlab = "nm") Error in loadingplot.default(x, ...) : Could not convert variable names to numbers. What am I doing wrong Thanks in advance [[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.