I am trying to make a biplot in R using the vegan package:
shared_tbl <-read_tsv("data/andok.shared")
my data is like this table:
Group | Blastocatellales | Frankiales | Cyanobacteriales |
---|---|---|---|
sample1 | 319 | 2563 | 546 |
sample2 | 4114 | 657 | 986 |
sample3 | 1463 | 123 | 85 |
sample4 | 158 | 367 | 631 |
shared_df <- shared_tbl%>%
column_to_rownames("Group")
#make a distance matrix
andok_dist <- avgdist(shared_df, sample = 1156)
#nmds ordination
set.seed(1996020)
andok_nmds <- metaMDS(andok_dist)
scores(andok_nmds)
and then I got the error: Error in x$species[, choices, drop = FALSE] : incorrect number of dimensions
A solution has reached in metaMDS after setting the seed.
I made my steps according to Pat Schloss https://www.youtube.com/watch?v=_EjNR6YdnGM&t=45s%5C half years ago, when the whole code ran without any errors.