interpolate {biplotEZ}R Documentation

Interpolate supplementary points and variables to add to the biplot

Description

This function adds supplementary points and variables to the plot from a new data set.

Usage

interpolate(bp, newdata = NULL, newvariable = NULL)

Arguments

bp

an object of class biplot obtained from preceding function biplot().

newdata

a new data set, similar in structure to the data set supplied to biplot() containing supplementary data points to be added onto the biplot.

newvariable

a new data set, similar in structure to the data set supplied to biplot() containing supplementary variables to be added onto the biplot.

Value

The object of class biplot will be appended with the following elements:

Xnew.raw

the new data.

Xnew

the matrix of the centered and scaled new numeric variables of new data.

Xnew.cat

the matrix of the categorical variables of new data.

Znew

the matrix of the coordinates of the new data in the biplot.

Examples

biplot(data = iris[1:145,]) |> PCA() |> interpolate(newdata = iris[146:150,]) |> plot()


[Package biplotEZ version 2.0 Index]