ncomp | R Documentation |
This function returns the total number of components in the fitted model.
ncomp(x)
x |
A fitted model object. |
The number of components in the fitted model.
# Example using the svd_wrapper function
data(iris)
X <- iris[, 1:4]
fit <- svd_wrapper(X, ncomp = 3, preproc = center(), method = "base")
ncomp(fit) # Should return 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.