Get the number of components
ncomp.RdThis function returns the total number of components in the fitted model.
Examples
# Example using the svd_wrapper function
data(iris)
X <- as.matrix(iris[, 1:4])
fit <- svd_wrapper(X, ncomp = 3, preproc = center(), method = "base")
ncomp(fit) # Should return 3
#> [1] 3