Learn R Programming

MorphoRegions (version 0.1.0)

PCOload: Calculate PCO loadings

Description

PCOload() computes the loadings for each principal coordinates (PCOs) analysis score, which are the correlations between the features used to compute the PCOs and the PCOs.

Usage

PCOload(x, scores)

# S3 method for regions_pco_load plot(x, ...)

Value

PCOload() returns a regions_pco_load object, which is a matrix with a column for each PCO score requested and a row for each variable in the original dataset; values indicate the correlation between each variable and each PCO score. plot() returns a ggplot object, which can be manipulated using ggplot2 syntax, that displays the loadings visually.

Arguments

x

for PCOload(), a regions_pco object; the output of a call to svdPCO(). For plot(), a regions_pco_load object.

scores

a numeric vector containing the indices of the desired scores.

...

ignored.

Details

the loadings for a constructed variable, vert.size, are also computed and displayed. This is computed as the mean of the features for each vertebra.

See Also

svdPCO() for computing the PCOs; plot.regions_pco() for visualizing the correlations between PCO scores.

Examples

Run this code
data("alligator")

alligator_data <- process_measurements(alligator,
                                       pos = "Vertebra")

# Compute PCOs
alligator_PCO <- svdPCO(alligator_data)

# Compute PCO loadings
loadings <- PCOload(alligator_PCO, scores = 1:4)
loadings

# Plot loadings
plot(loadings)

Run the code above in your browser using DataLab