plot.orthoProjection {resemble} | R Documentation |
orthoProjection
Plots the content pf an object of class orthoProjection
## S3 method for class 'orthoProjection' plot(x, ...)
x |
an object of class |
... |
arguments to be passed to methods. |
Leonardo Ramirez-Lopez and Antoine Stevens
## Not run: require(prospectr) data(NIRsoil) Xu <- NIRsoil$spc[!as.logical(NIRsoil$train),] Yu <- NIRsoil$CEC[!as.logical(NIRsoil$train)] Yr <- NIRsoil$CEC[as.logical(NIRsoil$train)] Xr <- NIRsoil$spc[as.logical(NIRsoil$train),] Xu <- Xu[!is.na(Yu),] Yu <- Yu[!is.na(Yu)] Xr <- Xr[!is.na(Yr),] Yr <- Yr[!is.na(Yr)] # A partial least squares projection using the "opc" method # for the selection of the optimal number of components plsProj <- orthoProjection(Xr = Xr, Yr = Yr, X2 = Xu, method = "pls", pcSelection = list("opc", 40)) plot(plsProj) ## End(Not run)