This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Convert NMDS object in vegan to a tibble object

Hello!

I ran an NMDS in a dataset with 13 rows and 2630148 columns using vegan. Now I am trying to save the scores of the NMDS to a tibble table. I am running the following command:

scores(nmds) %>%
   as_tibble(rownames = "samples")

And I am obtaining the following error:

Error:

! Tibble columns must have compatible sizes.

• Size 13: Column sites.

• Size 2630148: Column species.

ℹ Only values of size one are recycled.

Run rlang::last_error() to see where the error occurred.

Do you know how can I fix it? Because of the structure of my data the "sites" and "species" have to be different.

Thank you!

vegan nmds dplyr tibble r

what exactly do you expect as the structure of your resulting tibble? According to your error message scores(nmds) returns a list of two separate vectors which seemingly do not correspond to each other, i.e. you do not have enough data points for a 13x2630148 data frame. How do the sites values relate to species?

0 answers

No answers yet.

Log in to answer this question.