pls is an R package implementing partial least squares regression (PLSR) and principal component regression (PCR). The package is written by Ron Wehrens, Kristian Hovde Liland and Bjørn-Helge Mevik. It started as a merge of Ron's earlier package `pls.pcr' and an unpublished package by Bjørn-Helge.


A description of the package was published in R News 6(3), and a slightly longer description has been published as Mevik, B.-H., Wehrens, R. (2007); The pls Package: Principal Component and Partial Least Squares Regression in R; Journal of Statistical Software 18(2), 1—24.

Suggestions, bug reports and other comments are very welcome. Please use the github issue page.

The latest version of the package is available on CRAN (direct link).


VIP.R, an implementation of the Variance Importance in Projection, as described in Chong, Il-Gyo & Jun, Chi-Hyuck, 2005, Performance of some variable selection methods when multicollinearity is present, Chemometrics and Intelligent Laboratory Systems 78, 103–112. It currently only works with single-response ortghogonal scores plsr models.

specplot.R, a function to interactively plot spectra. It allows zooming and panning of the spectra (sofar only horizontally). It takes the same arguments as matplot, except xlim. There are also two extra arguments: reverse to plot the spectra from right to left, and plot.add to specify plot code to be evaluated after the plot is redrawn, for instance plot.add = { abline(h = 0) }.