Questions tagged [vegan]

vegan is a package for use with R for the analysis of ecological communities, especially vegetation communities. It has tools for analyzing ecological diversity and for the multivariate analysis of communities (NMDS, pCCA, pRDA, etc.)

Vegan is an package that provides ordination methods, diversity analysis and other functions for community and vegetation ecologists.

Vegan contains many popular tools used in community ecology:

  • Diversity analysis: Shannon, Simpson, Fisher indices, Rényi diversities and Hill numbers.
  • Species abundance models: Fisher and Preston models, species abundance distributions.
  • Analysis of species richness: species accumulation curves, extrapolated richness.
  • Ordination: support and meta functions for NMDS, redundancy analysis, constrained correspondence analysis, constrained analysis of proximities (all three with partial analysis),
  • Support functions for ordination: dissimilarity indices, extended dissimilarities, Procrustes analysis, ordination diagnostics, permutation tests.
  • Ordination and environment: vector fitting, centroid fitting and smooth surface fitting, adding species scores as weighted averages, adding convex hull, SD ellipses, arrows etc. to ordination.
  • Dissimilarity analyses: ANOVA using dissimilarities, ANOSIM, MRPP, BIOENV, Mantel and partial Mantel tests.
  • Data standardization: Hellinger, Wisconsin, Chi-square, Beals smoothing.

Repositories

Vignettes

Other resources

Related tags

585 questions
0
votes
0 answers

How do I include continuous and categorical variables in the same CCA?

I'm trying to do a Canonical Correspondence Analysis in R using the vegan package. I've run it no problem with my continuous variables, but when I include some categorical variables (which I'm able to do in XLSTAT program), R returns with an…
0
votes
1 answer

Ordistep function from vegan error on large RDAs

I have been running the ordistep function on the results of an RDA on a species abundance matrix and a large number of PCNMs. here is the code I have been using. Chr is a numerical vector from 1:23 to loop through different experiments, and…
Brent
  • 1
0
votes
1 answer

What does the x and y axis represents in the nmds bray-curtis dissimilarity index?(Vegan package R)

This graph shows the distribution of weeds on 3 treatments ( indicated by color). By googling I found that the graph is bounded between 0 and 1, where 0 means the sites (Treatment) have the same composition (that is they share all the species), and…
Mr Good News
  • 121
  • 1
  • 3
  • 15
0
votes
1 answer

How to change the color in the vegan graph? (bray)

Here is my code library(vegan) library(MASS) row.names(Data) <- c("SI1", "SII0", "SI0", "SII2", "SI2", "SII1", "SIII0", "SIV2", "SIII2", "SIV1", "SIII1", "SIV0") bcdist <- vegdist(Data, "bray") bcmds <- isoMDS(bcdist, k = 2) plot(bcmds$points,…
Mr Good News
  • 121
  • 1
  • 3
  • 15
0
votes
1 answer

adjusted R2 for conditional constrained ordination

After a model selection of a partial ordination, is it correct to apply the function RsquareAdj(mod.sel) to get the adjusted R2? Or is it correct to use Ezekiel's formula in a straightforward manner?
Remi
  • 11
  • 2
0
votes
1 answer

Partial Mantel test in R vegan package gives error

I'm trying to run Partial Mantel tests using R vegan package. I'm getting the following error in the output even on a very simple dummy data. My code: m1 = matrix(c(0, 1, 2, 1, 0, 3, 2, 3, 0),nrow = 3) m2 = m1 *…
Hani
  • 13
  • 4
0
votes
1 answer

in R, does a "goodness of fit" value exist for vegan's CCA, similar to NMDS's "stress" value?

I would like to know if there is a way to extract something similar to the metaMDS "stress" value from a vegan cca object? I've tried the goodness.cca function and its…
crazysantaclaus
  • 613
  • 5
  • 19
0
votes
1 answer

R vegan package: RDA analysis with multiple variables

Goodmorning everyone, I'm trying to perform rda analysis with vegan package. My df1 looks like: 816fit 308fit 433fit 008fit 1057fit id21 0 0 0 0 0 id22 0 0 0 …
Dr.PhilCol
  • 21
  • 5
0
votes
1 answer

Variation partitioning using latitude and longitude as explanatory variables

I am using the varpart function present in the vegan package. this is my script: CR_all.fun_var_part <- varpart(all_fungi, ~ age, ~ lat +long, data = Cr_var) CR_all.fun_var_part plot(CR_all.fun_var_part, digits=2) my response variable, all fungi,…
i.b
  • 167
  • 11
0
votes
1 answer

Extract R2 values from multiple adonis results

I am wondering if there is some way how to extract results from adonis function in vegan package and possibly save it by write.table? I mean other way than print results to console and copy-past R2 value to Excel. This can be especially useful when…
tlask
  • 198
  • 9
0
votes
1 answer

Adding environmental data to CCA ordination in R

I am working on adding environmental data to my ordination using the Phyloseq/vegan package. After running the ordination, the output tells me: Some constraints were aliased because they were collinear (redundant) When I change the order in the…
0
votes
1 answer

Is a Detrended Correspondance Analysis over time possible?

I have a dataset with presence-absence species data measured at several different sites. The data was measured over the span of 10 years. On many sites, measurements were taken several times within a year. The frequency of measurements is not…
gamel
  • 29
  • 6
0
votes
0 answers

Vegan::Adonis Error with matrix input

Link to data I'm trying to use adonis (per the persistent advice of an advisor) to see what variation in the data set is due to bee colony (variable OBJECTID) and what is due other variables. My dataframe is titled bees. Previous, I tried putting…
wissem
  • 58
  • 8
0
votes
2 answers

Coloring Rarefaction curve lines by metadata (vegan package) (phyloseq package)

First time question asker here. I wasn't able to find an answer to this question in other posts (love stackexchange, btw). Anyway... I'm creating a rarefaction curve via the vegan package and I'm getting a very messy plot that has a very thick black…
Samaj Oruel
  • 17
  • 1
  • 5
0
votes
1 answer

Average Species Accumulation Curve?

I am interested in generating an average species accumulation curve (# fish species per minute of survey) across multiple surveys. I understand how specaccum() (vegan) is generally used to look at the accumulation of species as more sites are…
Kodiakflds
  • 603
  • 1
  • 4
  • 15