view_pls_xloadings: Plot the x loadings by components for PLS models.

Description Usage Arguments Value Examples

View source: R/view_pls_xloadings.R

Description

Plot the x loadings by components for PLS models.

Usage

1
2
view_pls_xloadings(model, comps = 1:2, renaming.x = function(x) x,
  title = NULL)

Arguments

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 plsr.

Value

Prints the loadings of the X in PLS by two components, with circles indicating 50

Examples

 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)

lwjohnst86/seer documentation built on May 21, 2019, 9:15 a.m.