predict.sprcomp: apply principal component projection/rotation.

Description Usage Arguments Value Examples

View source: R/svdprcomp.R

Description

applies rotation returned by sprcomp to new data.

Usage

1
2
## S3 method for class 'sprcomp'
predict(object, newdata, ...)

Arguments

object

sprcomp object.

newdata

new matrix to apply to.

...

not used, declared to match S3 object signature.

Value

projected data.

Examples

1
2
p <- sprcomp(USArrests,k=2,center=TRUE,scale.=TRUE)
predict(p,newdata=USArrests)

WinVector/crosspca documentation built on June 24, 2020, 5:09 p.m.