opls
functionProjects new spectra onto a PLS space based on a model generated by either by opls
or the opls2
functions.
For internal use only!.
project_opls(projection_mat, ncomp, newdata, scale, Xcenter, Xscale)
a matrix corresponding to the new spectra projected onto the PLS space
the projection matrix generated by the opls
function.
an integer value indicating how may components must be used in the prediction.
a matrix containing the predictor variables.
a logical indicating whether the matrix of predictors used to create the regression model was scaled.
a matrix of one row with the values that must be used for centering newdata
.
if scale = TRUE
a matrix of one row with the values that must be used for scaling newdata
.
Leonardo Ramirez-Lopez