NMDSplot
NMDSplot.Rd
This function generates a Non-metric Multidimensional Scaling (NMDS) plot based on the provided beta diversity distance matrix. It also performs PERMANOVA analysis to assess the significance of group differences and saves the results to CSV files.
Arguments
- mmo
The mmo object containing metadata
- betadiv
The beta diversity distance matrix, output of GetBetaDiversity()
- prefix
The prefix for the output files
- width
The width of the output NMDS plot (default: 6)
- height
The height of the output NMDS plot (default: 6)
- color
A vector of colors for the groups in the plot
Examples
if (FALSE) {
beta_diversity <- GetBetaDiversity(mmo, method = 'Gen.Uni',
normalization = 'None', distance = 'dreams', filter_feature = FALSE)
# Use method = 'bray' or 'jaccard' if you want to use just feature abundance
# without considering feature spectral dissimilarity
NMDSplot(mmo, betadiv = beta_diversity, prefix = 'output/NMDS', width = 6, height = 6)
}