Missing vector values when using envfit

39 Views Asked by At

I'm rather new with using vegan for analysis of microbial community data. I'm seeing a problem that the envfit() output doesn't contain any vector values, which are the ones I need for the plot.

Here is the code I used and the example files:

Code:

data.envfit.nmds = envfit(veganNMDS, mapping[, c("type", "location", "year")], permutations = 999, na.rm=FALSE)

veganNMDS:

Call:
metaMDS(comm = otu_hell, distance = "bray") 

global Multidimensional Scaling using monoMDS

Data:     otu_hell 
Distance: bray 

Dimensions: 2 
Stress:     0.1795224 
Stress type 1, weak ties

Snapshot of out_hell (there are a lot more columns and rows):

| |OTU1|OTU10|OTU100|OTU10003|OTU1001|OTU10016|
|-|----|-----|------|--------|-------|--------|
|Kras_10xS105_M01863|0|0.11208749|0|0|0|0|
|Kras_11xS106_M01863|0|0.12571412|0|0|0|0|
|Kras_12xS107_M01863|0|0.57184274|0|0|0|0|
|Kras_13xS108_M01863|0|0.07716415|0|0|0|0|
|Kras_14xS109_M01863|0|0.03789583|0|0|0|0|

mapping:

| |type|location|year|
|-|----|--------|----|
|Kras_10xS105_M01863|Hrast|B|X|
|Kras_11xS106_M01863|Hrast|B|X|
|Kras_12xS107_M01863|Hrast|B|X|
|Kras_13xS108_M01863|Hrast|B|X|
|Kras_14xS109_M01863|Hrast|B|X|
|Kras_15xS110_M01863|Hrast|B|X|
|Kras_16xS111_M01863|Hrast|B|X|
|Kras_17xS112_M01863|Hrast|B|X|
|Kras_18xS113_M01863|Hrast|C|X|
|Kras_19xS114_M01863|Hrast|C|X|
|Kras_1xS96_M01863|Bor|B|X|
0

There are 0 best solutions below