Add a trend arrow on dbRDS ordination plot
0
0
Entering edit mode
3.6 years ago

Hi all,

I'm working on 1) the data of functional abundance table and 2) the metadata of samples.

Their structure is:

1) rows: sample ID, columns: name of functions --> functional abundance
2) rows: sample ID, columns: disease state, nationality --> Metadata

and the sample IDs in functional abundance and Metadata are exactly matched.

The problem is, I can make an ordination plot using the outcome of dbRDS analysis and add some trend(?) arrows following disease state, but I have no idea how to add arrows of some specific functions' trend.

So what I want to show is, making a ordination plot following disease state (I can draw this) having 10 most significant functions' arrows showing their change trend (I can't do this).

I've tried with 'envfit' function with below code, but always have error.

*envfit(capscale_outcome, Name of top 10 significant functions, permutations=0, strata=NULL, choices=c(1,2), display='sites', w = weights(capscale_outcome))*

*Error in vectorfit(X, env, permutations, strata, choices, w = w, ...) :
  input data have non-matching numbers of observations*

Any idea how to fix this?

Thank you all

R rds • 701 views
ADD COMMENT

Login before adding your answer.

Traffic: 2289 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