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

Saving ordination object in vegan in r

How can I save an MDS object for use in my next session of R? Because the metaMDS() function uses several random restarts it produces slightly different answers each time. I need the output to be consistent across several sessions of R. How can I…
Elizabeth
  • 6,391
  • 17
  • 62
  • 90
0
votes
1 answer

Changing line thickness in ordihull vegan r package

How can I change the thickness of the boundary lines used in ordihull? library(vegan) data(dune) data(dune.env) mod <- cca(dune ~ Management, dune.env) attach(dune.env) plot(mod, type="n", scaling = 3) pl <- ordihull(mod, Management, scaling = 3,…
Elizabeth
  • 6,391
  • 17
  • 62
  • 90
-1
votes
1 answer

Is there a way to define the first column as site names for specaccum in the R vegan package to avoid errors?

I believe I'm struggling with a data frame issue. In my data set, my first column is site names, call them Tech 1 through Tech 8. The rest of my columns are each assigned to one species, with binary 0s or 1s beneath to signify their presence in each…
-1
votes
1 answer

Problem with permute and lattice while installing vegan package

I'm trying to do my homework, but got somehow stuck. Please help! I've already installed "permute" and "lattice" ... but it still doesn't work. What can I do?
-1
votes
1 answer

dbRDA in R, how to with abundance data and missing values for environmental data

Using R, I'm trying to do a dbRDA on a set of abundance data of 9 species (units cells/mL) over 10 sampling days and I have 8 environmental variables (different units and some missing values). I want a test to show how the environmental variables…
-1
votes
1 answer

Different results using ANOSIM and SIMPER in R

I have run ANOSIM and SIMPER to analyse community similarity at two treatments. When I run ANOSIM the output is: ANOSIM statistic R: -0.04465 Significance: 0.749 meaning they are similar to each other? but the I run SIMPER it says the…
CHA
  • 3
  • 4
-1
votes
1 answer

CCA analysis with small dataset

I am using R with the vegan package to analyse the significance of environmental factors on bacterial communities (OTU table) at different sites. However I got a few issues which I am not sure how to address, and if my approach is suitable. Would be…
-1
votes
1 answer

Modified gower distance in R

I have a mixed data (categorical and continuous) and I want to compute the modified Gower coefficient using the vegandist command library(vegan) vegdist(mydata, "altGower") However, the following error appears: Error in rowSums(x, na.rm = TRUE) :…
user2246905
  • 1,029
  • 1
  • 12
  • 31
-1
votes
1 answer

How do I manipulate a distance object in r to extract just the values I want?

I'm trying to conduct an analysis where I need to know the relative change in community composition over time using Sørensen's or bray-Curtis distance. I have a matrix of plots that looks like this: > example plot species_a species_b species_c 1 …
-1
votes
1 answer

nMDS with seemingly poor Shepard's Plot but good ANOSIM/ADONIS

Having produced a Bray-Curtis dissimilarity with my Hellinger-transformed data (26 samples, 3000+ species/OTUs), I went on to build a MDS plot. I got the following metrics: Dimensions: 2 Stress: 0.111155 Stress type 1, weak ties Two…
André Soares
  • 309
  • 1
  • 13
-1
votes
1 answer

Creating a number of species/individuals by sample table?

I have a huge abundance matrix as a data.frame (example below) in R from which I want to output a simple table with the number of species present (Otu00001, and whichever Otus with more than 1 attributed sequence) and number of attributed sequences…
André Soares
  • 309
  • 1
  • 13
-3
votes
2 answers

R: Plot data in matrix against data from one column

I have a matrix containing >200 data points. This is my object x. In a second object (metadata), I have a column (y) with 20 data points. I would like to plot the matrix (object x) against the 20 data points (y) in object metadata plot(x,…
Tatatam
  • 7
  • 3
-3
votes
1 answer

SIMPER (R) getting Error in seq_len(min(which(z >= 0.7))) :

I'm currently trying to run the SIMPER {vegan} function to a matrix that has NAs in it and currently can not be turn into 0s. I'm getting: Error in seq_len(min(which(z >= 0.7))) : argument must be coercible to non-negative integer In addition:…
-4
votes
1 answer

r coding for customising vegan plot

I am attempting to produce an NMDS plot in vegan, but really struggling with the code. I am trying to display the site points and species points differently, with the site points coloured according to treatment. Both lines work individually, but I…
1 2 3
38
39