PCOload {MorphoRegions} | R Documentation |
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.
PCOload(x, scores)
## S3 method for class 'regions_pco_load'
plot(x, ...)
x |
for |
scores |
a numeric vector containing the indices of the desired scores. |
... |
ignored. |
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.
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.
svdPCO()
for computing the PCOs; plot.regions_pco()
for visualizing the correlations between PCO scores.
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)