nameExpositionResults: add dimension names to the results from 'ExPosition' or...

View source: R/renameExPoDF.R

nameExpositionResultsR Documentation

add dimension names to the results from ExPosition or InPosition (for use with ggplot2).

Description

nameExpositionResults: adds dimension names to the results of analyses performed with ExPosition (column names are needed for plots created with ggplot2).

Usage

nameExpositionResults(resExpo, names4Dimensions = "Dimension ")

Arguments

resExpo

the output of an analysis performed by ExPosition with the functions: epCA, epPCA, epGPCA, epMCA, epMDS.

names4Dimensions

names for the dimensions, Default: 'Dimension '

Details

ExPosition returns the results of its analysis in a list of matrices that comprises the factor scores, the contributions, the cosines (etc. see documentation for ExPosition). The columns of these statistics do not have names and this creates a problem when using ggplot2 whose syntax requires names for variables in aes().

Value

the original results with their dimensions named or renamed.

Author(s)

Hervé Abdi

See Also

ExPosition

Examples

## Not run: 
if(interactive()){
# Get the data from package data4PCCAR
df <- twentyWines$df.active
resPCA <- epPCA(df, scale = FALSE, graphs = FALSE, k = 1)
resPCA.named <- nameExpositionResults(resPCA)
 }

## End(Not run)

HerveAbdi/data4PCCAR documentation built on Sept. 11, 2022, 4:19 p.m.