Format a PCA loading table with colour-coded cells and abbreviated trait names.
format_correlation_table <- function(PCoACorPlot, shortNames) {
cbind.data.frame(
PCoACorPlot,
color = shortNames[match(rownames(PCoACorPlot), shortNames$original), "color"],
names = shortNames[match(rownames(PCoACorPlot), shortNames$original), "short"]
)
}