Search code examples
rvegan

How to retrieve the raw output data from my NMDS graph?


I have run an NMDS analysis with the vegan package and produced the graph below. I would now like to extract the values (x value from the NMDS 1 axis and y value from NMDS 2 axis) of each of the points within the graph. I have done some searching around online but haven't found any solutions. Has anyone done this before?

The data is organized as a dataframe with 4 columns, one for each Arctic habitat in the graph, and 208 rows, each row is the total count of a species in each Arctic habitat.

Here is the code I used to produce the graph:

library(vegan)

arctichabitat<-read.csv(file.choose())

arctichabitat.nmds <- metaMDS(arctichabitat, distance = "bray", trace = F, trymax = 100)

plot(arctichabitat.nmds)
text(arctichabitat.nmds, display = "species", csv = 0.5)

enter image description here

How do I solve the problem?


Solution

  • All vegan ordination objects have function scores that can extract the values you asked. This is even documented: see ?metaMDS.