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
4 answers

How can I tell R to apply functions to multiple data?

I have been stacking this work for quite long time, tried different approaches but couldn't succeed. what I want is to apply following 4 functions to 30 different data (data1,2,3,...data30) within for loop or whatsoever in R. These datasets have…
R starter
  • 197
  • 12
0
votes
1 answer

How to connect several points with an arrow omitting ggplot2

I made an ordination of a time series of some vegetation data, using the vegan package. Since ordination diagrams often are cluttered with many data points, I extracted the eigenvalues of the first two ordination axes and took the mean of each…
Stevestingray
  • 399
  • 2
  • 12
0
votes
1 answer

PCoA function pcoa extract vectors; percentage of variance explained

I have a dataset consisting of 132 observations and 10 variables. These variables are all categorical. I am trying to see how my observations cluster and how they are different based on the percentage of variance. i.e I want to find out if a) there…
Y.P.Toh
  • 1
  • 1
  • 3
0
votes
1 answer

'X' must be numeric error in Decorana/VEGAN function after subsetting in R

I keep getting this error:Error in rowSums(veg) : 'x' must be numeric I subsetted from a large dataset a small portion and when I run the DCA ordination I keep getting the above mentioned error message. I checked, but I have no character data in…
Stevestingray
  • 399
  • 2
  • 12
0
votes
1 answer

Decluttering NMDS ordination plot

I have breeding bird assemblages data from quarry and calcareous grassland sites and want to display them in a nmds ordination plot, together with environmental parameters as vectors. How can I unclutter the species tags? I'm using the vegan package…
Bennet
  • 35
  • 1
  • 5
0
votes
1 answer

How to colour lines in vegan's rarecurve by factors?

Im trying to plot a rarefaction curve for each of my 20 samples - and colour the lines by the respective treatment type (5) using rarecurve in vegan R. I have grouped the columns together that are replicates of the same treatment types as a factor:…
Elle Bowd
  • 5
  • 7
0
votes
1 answer

How do you rescale variables and measure distance from CCA coordinate to centroid in vegan?

I'm a new student in a bioinformatics lab, please feel free to correct me if anything is wrong. I have made a CCA using the vegan package in R with the following script: cca.analysis <- cca(mod ~ genus1 + genus2 + genus3, data) I'm currently…
adam.bj
  • 11
  • 3
0
votes
1 answer

ordiplot3d colour by treatment/category

I have to make a 3d ordination (NMDS) since there was too much stress with the 3D. I'm able to make a 3d ordination using oriplot3d, but cannot figure out how to colour the points by a category in my metadata. Also, I'm using Phyloseq. Does anyone…
0
votes
1 answer

Why do I always get 1 for df when running adonis function (permanova)?

I run adonis on community data and environmental matrix (that contains a factor of two levels and 6 continuous variables) using Bray-Curtis and I always take 1 df but this is not the case. Probably there is a bug here. See also the example in adonis…
user1711727
  • 21
  • 1
  • 4
0
votes
0 answers

Reporting the results of CCA (vegan)

I've done a CCA analysis with the R package vegan on some macrofaunal data and environmental variables, trying to figure out which variables affect the macrofauna and how much. My CCA output is as follows: Call: cca(formula = abun_df ~ NH4_inv_PW +…
Snowfaerie
  • 23
  • 1
  • 10
0
votes
1 answer

Can I extract certain dissimilarity values from a bray curtis matrix in R?

I am trying to assess how long a change in stream communities persists following invasive species removals. Community was assessed in a series of streams before and at several time points after the removal. I would like to calculate dissimilarity…
0
votes
0 answers

Error using dbrda function for the vegan package in R

I am currently trying to run a dbRDA using the vegan package. I used three explanatory matrices to explain one response distance matrix: full.rda <- dbrda(bsim ~ genmat + envmat + spamat) The first one is a distance matrix while the last three are…
Lucie Kcz
  • 1
  • 1
0
votes
1 answer

RDA visualisation - plot Species abundance according to RDA1

I have sampled 87 plots and identified overall 9 earthworm species. My aim is to investigate changes in species richness and abundance across my site (sampled across 87 plots), which is known to be polluted (mainly by Cu, Zn, and Pb but I also…
user3016665
  • 139
  • 2
  • 8
0
votes
1 answer

R cca and predict.cca in Vegan

I have a species table count (data) which consists on species discrete counts (columns) per sample (row). The samples are divided in 2 categories: control and stress which are represented in a design file by a single column: Condition. My idea:…
Sara
  • 933
  • 2
  • 10
  • 15
0
votes
1 answer

pairwiseAdonis error In if (class(x) == "dist")

I apologise for the tags, but StackOverflow wouldn't let me make a new tag for pairwiseAdonis, so I had to use vegan instead, since this technically concerns a post-hoc test for it. I downloaded pairwiseAdonis to do some PERMANOVA (vegan) post-hoc…
Snowfaerie
  • 23
  • 1
  • 10