get_coordinates: Get Coordinates

get_coordinatesR Documentation

Get Coordinates

Description

Get Coordinates

Usage

get_coordinates(x, ...)

get_replications(x, ...)

## S4 method for signature 'MultivariateAnalysis'
get_coordinates(x, margin = 1, principal = TRUE, sup_name = ".sup")

## S4 method for signature 'MultivariateBootstrap'
get_replications(x, margin = 1)

## S4 method for signature 'BootstrapPCA'
get_replications(x)

Arguments

x

An object from which to get element(s) (a CA, MCA or PCA object).

...

Currently not used.

margin

A length-one numeric vector giving the subscript which the data will be returned: 1 indicates individuals/rows (the default), 2 indicates variables/columns.

principal

A logical scalar: should principal coordinates be returned? If FALSE, standard coordinates are returned.

sup_name

A character string specifying the name of the column to create for supplementary points attribution (see below).

Value

  • get_coordinates() returns a data.frame of coordinates. An extra column (named after sup_name) is added specifying whether an observation is a supplementary point or not.

  • get_replications() returns an array of coordinates.

Author(s)

N. Frerebeau

See Also

Other mutators: dimnames(), get_contributions(), get_data(), get_distances(), get_eigenvalues(), loadings(), subset()

Examples

## Load data
data("iris")

## Compute principal components analysis
X <- pca(iris, scale = TRUE, sup_row = 5:10)

## Get row principal coordinates
head(get_coordinates(X, margin = 1, principal = TRUE))

## Get row standard coordinates
head(get_coordinates(X, margin = 1, principal = FALSE))

## Tidy principal coordinates
head(tidy(X, margin = 1))
head(tidy(X, margin = 2))

head(augment(X, margin = 1, axes = c(1, 2)))
head(augment(X, margin = 2, axes = c(1, 2)))

dimensio documentation built on Nov. 25, 2023, 1:08 a.m.