PlotOrdCorr.RdCalculate correlations between NMDS ordination axes (from beta diversity distances) and metadata, and plot a ggplot2 heatmap with numeric labels and significance stars.
For continuous variables, Pearson correlation is used. P values follow this convention: p < 0.001, p < 0.01, p < 0.05 = three, two, one stars, respectively.
Default num_mds is 10, but function will internally set max number of NMDS to be n-1 where n is your number of samples.
PlotOrdCorr(object, num_mds = 10, meta_cols = NULL, distance = "bray")A list with elements: cor_matrix, pval_matrix, stars, plot (ggplot), and variance explained (squared correlations between ordination distances and observed dissimilarities.)