Learn R Programming

dimensio (version 0.10.1)

get_coordinates: Get Coordinates

Description

Get Coordinates

Usage

get_coordinates(x, ...)

get_replications(x, ...)

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

# S4 method for PCOA get_coordinates(x)

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

# S4 method for BootstrapPCA get_replications(x)

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.

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).

Author

N. Frerebeau

See Also

Other getters: export(), get_contributions(), get_data(), get_eigenvalues()

Examples

Run this code
## 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)))

Run the code above in your browser using DataLab