Convert NMDS object in vegan to a tibble object
0
0
Entering edit mode
22 months ago
Paula ▴ 60

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 • 718 views
ADD COMMENT
0
Entering edit mode

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?

ADD REPLY

Login before adding your answer.

Traffic: 2929 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6