transform: Generic tranform function

View source: R/pcasvd.R

transformR Documentation

Generic tranform function

Description

Transformation of the X-data by a fitted model.

Usage


transform(object, X, ...)

Arguments

object

A fitted model, output of a call to a fitting function.

X

New X-data to consider.

...

Optional arguments.

Value

See the examples.

Examples


n <- 6 ; p <- 4
X <- matrix(rnorm(n * p), ncol = p)
y <- rnorm(n)

fm <- pcaeigen(X, nlv = 3)
#fm <- plskern(X, y, nlv = 3)
fm$T
transform(fm, X[1:2, ], nlv = 2)


mlesnoff/rchemo documentation built on April 15, 2023, 1:25 p.m.