Description Usage Arguments Value Examples
View source: R/view_pls_xloadings.R
Plot the x loadings by components for PLS models.
1 2 | view_pls_xloadings(model, comps = 1:2, renaming.x = function(x) x,
title = NULL)
|
comps |
The component numbers, e.g. for the first 2 it would be '1:2', for the first and third, 'c(1,3)', and so on. |
renaming.x |
A function to renaming the x variables for the PLS model. |
title |
The main title of the plot. |
pls.model |
The PLS model generated from |
Prints the loadings of the X in PLS by two components, with circles indicating 50
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
library(pls)
data(yarn)
fit <- plsr(density ~ NIR, 6, data = yarn, validation = "CV")
view_pls_xloadings(fit)
fit <- plsr(density ~ NIR, 6, data = yarn)
view_pls_xloadings(fit)
view_pls_xloadings(fit, title = 'Near-infrared radiation')
view_pls_xloadings(fit, title = 'Near-infrared radiation',
renaming.x = function(x) gsub('NIR', 'Wave ', x))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.