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

R: How to permute only column in a data frame/matrix

I want to create x randomised matrices where only the columns are permuted but the rows are kept constant. I already took a look at permatful() in the vegan package. Nevertheless, i was not able to generate the desired result even though i am quite…
MrNetherlands
  • 920
  • 7
  • 14
0
votes
1 answer

anova.cca cannot find object within user defined function

I want to execute the same rda analysis sequence (fitting a model, testing significance of the model, the axis, and the term, plotting the data) on subsets of the same datasets. Therefore I wrote a function. The problem now is that the call to the…
Nightingale
  • 233
  • 1
  • 10
0
votes
1 answer

axis break in plot metaMDS

I have an abundance table of fungal species from 16 different samples (xylem tree tissue) belonging to three healthy classes. I want to visualize the similarity of these samples according to the health class. I have run metaMDS (vegan package) and…
Nanuk
  • 11
  • 1
0
votes
0 answers

Faceting in rankabunplot

A follow-up to how to add specnames to rankabuncomp? The following code, from user Jari Oksanen helped to plot curves one by one, on the same plane. library(BiodiversityR) data(dune, dune.env) ## list of models mods <- with(dune.env,…
Little Bee
  • 1,175
  • 2
  • 13
  • 22
0
votes
0 answers

R - Error message in doing rda analysis - vegan package

With this data frame grouping the response variables : And this df grouping the explanatory variables : I perform the vegan::rda like this : fish_rda <- rda(fish ~ kJ_per_kg_GF + Condition(factor(annee)), data=df_rda) But when I call…
Loulou
  • 703
  • 5
  • 17
0
votes
1 answer

Manually build SIMPER contrast matrix from dataframe R

I am using the simper function from the vegan package. Briefly, simper compares a a set of groups and calculates what variables are contributing most to their dissimilarity, and also by how much, in a column named cusum that gives the cumulative…
J.Con
  • 4,101
  • 4
  • 36
  • 64
0
votes
1 answer

Area of polygon in ordiellipse is NaN - why?

I'm trying to add ellipses onto my NMDS plot created with Vegan package on R, but although the code goes through without an error, no polygons get drawn onto my graph. After using the summary() function, I found that the area of the polygon is NaN,…
0
votes
0 answers

Randomly picking an increasing number of columns and summing up unique counts at each

I have two separate tab delimited data sets, datA and datB. datA looks like this, with the entries in the source column going all the way to 10 million rows source Bin1 Bin2 Bin3 Bin4 Bin5 A 1 1 2 2 …
Daudi
  • 11
  • 5
0
votes
1 answer

convert a list -class numeric- into a distance structure in R

I have a list that looks like this, it is a measure of dispersion for each sample. 1 2 3 4 5 0.11829384 0.24987017 0.08082147 0.13355495 0.12933790 To further analyze this I need it to be a distance…
Andrés Parada
  • 319
  • 7
  • 21
0
votes
1 answer

Vegan: Significant axes in RDA

I have a data frame of phytocoenological relevés: rows represent sites columns represent species I run RDA on it using vegan function rda(matrix ~ 1). Now I have the axes of the ordination summary(rda)$sites, but how to find out which of them…
Kryštof Chytrý
  • 348
  • 1
  • 3
  • 15
0
votes
1 answer

Alternative example for capscale function in vegan package

I have been learning multivariate analyses in PRIMER, yet now want to convert to R using the vegan package. I wish to use the capscale() function in vegan, yet am not sure how my data should be formatted beforehand. In the example in the vignette…
J.Con
  • 4,101
  • 4
  • 36
  • 64
0
votes
1 answer

using envfit with vectors of different magnitudes in R

When using envfit in the vegan package, does the magnitude of each parameter matter? I have two dataframes: bwsp: invertebrate abundances bwenv: five environmental parameters (distance, depth, flow, chlorophyll, phaeophytin) Three of my parameters…
ayesha
  • 135
  • 15
0
votes
1 answer

Interpreting metaMDS procrustes rotation

Does the metaMDS function in vegan rotate the ordination solution so the first axis explains the most variance? If not, is there a way to achieve this? Run 20 stress 0.09957583 ... Procrustes: rmse 0.0001349268 max resid 0.0009665635 ... Similar…
Jenny
  • 1
0
votes
1 answer

Joint plots with vectors from a subset of the data

I'm generating NMDS ordination plots from community data using the R package, vegan, and want to include vectors (ie arrows from the origin) whose lengths correspond to the importance of selected species. How can I limit the arrows displayed to only…
Peter Nelson
  • 85
  • 1
  • 2
  • 7
0
votes
0 answers

Formatting data for use with anosim() funciton

I have some data in the form: Year Altitude Habitat Guild Count 2008 1834 Primary Omnivore 6 ... ... ... ... ... Where Years = 2008, 2011, or 2014 Habitat = Primary or Secondary Guild = Carnivore, Omnivore, Frugivore,…