plotsl | R Documentation |
Plot the slopes or differences between two successive elements of a vector x
.
The function is mainly used by other functions, such as selscree
, etc.
plotsl(x,
start = 1,
plot = c("slope", "diff", "none"),
xlab = "Index", ylab = "Value",
...)
x |
A numeric vector. |
start |
Starting value for indexing the elements of vector |
plot |
Type of plot. Possible values are |
xlab |
x-axis label of the plot of |
ylab |
y-axis label of the plot of |
... |
Optionnal arguments to pass through function |
A list (invisible) of outputs, see the examples.
data(datoctane)
X <- datoctane$X
## removing outliers
zX <- X[-c(25:26, 36:39), ]
plotsp(zX)
ncomp <- 30
fm <- pca_eigen(zX, ncomp = ncomp)
plotsl(fm$eig[seq(ncomp)], plot = "diff")
z <- plotsl(fm$eig[seq(ncomp)], plot = "none")
names(z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.