ncomp: Get the number of components

View source: R/all_generic.R

ncompR Documentation

Get the number of components

Description

This function returns the total number of components in the fitted model.

Usage

ncomp(x)

Arguments

x

A fitted model object.

Value

The number of components in the fitted model.

Examples

# 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

bbuchsbaum/multivarious documentation built on April 15, 2024, 3:33 a.m.