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