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

Is it possible to make a dendrogram equivalent of a constrained correspondence analysis?

There is a function called LINKTREE in PRIMER where a tree is created based on community dissimilarity, but each breakpoint must correspond to a threshold in one or more environmental (constraining) variables. Is there an equivalent function in R?…
Jen F.
  • 57
  • 1
  • 8
0
votes
1 answer

Rarefaction curves in RStudio. How do I add labels to the end of the lines?

I am using R to do a simple rarecurve, it makes a nice graph and i can colour and add lables to the axis or title. But I can not get it to show the plot labels. Someone help? Below is what I started with. library(vegan) rarecurve(orders, step=1,…
Ads
  • 1
  • 2
0
votes
0 answers

Trouble with ordispider function in R

I'm very new to R and trying to add an ordispider to an ordplot (NMDS). My original data matrix has a site column, several weather columns, and columns with duck counts. I defined the whole matrix as NMDS. I defined the duck counts…
0
votes
1 answer

Error in loading the library for vegan

I installed the new version of vegan (and permute, it seemed to not work with the older version I had), but I don't manage to load the library anymore. I get this error (sorry for french part of the message): Error in dyn.load(file, DLLpath =…
Jude
  • 153
  • 2
  • 8
0
votes
0 answers

referring to function column name that may change in ggplot

I have a simple ggplot function here that plots biplot arrows from a capscale ordination. I do realize there are builtin vegan packages, and even ggvegan to do this for me. This actually ends up being part of a more complicated other function and I…
ohnoplus
  • 1,205
  • 1
  • 17
  • 29
0
votes
1 answer

R ggplot2 connecting points NOT by x-axis but by factor

I'm having a data.frame extracted from vegan metaMDS which looks like this: MDS1 MDS2 time nucleic_acid habitat treatment 10dnawatercontrol 0.06297458 0.153364604 10 dna water control 10dnawatertreated -0.20010385…
crazysantaclaus
  • 613
  • 5
  • 19
0
votes
1 answer

R: Draw arrows in ggplot2 based on loop

I have a dataset as follows: i <- data.scores i NMDS1 NMDS2 Plot_1_O -0.1716069847 -1.177471624 Plot_2_O -0.2452065424 -0.978276228 Plot_3_O 0.3885298355 -0.578810975 ... ... ... Plot_64_O …
0
votes
1 answer

How to specify subset/ sample number for permutations using specaccum() in R's vegan package

I have a community matrix (species as columns, samples as rows) from which I would like to generate a species accumulation curve (SAC) using the specaccum() and fitspecaccum() functions in R's vegan package. In order for the resulting SAC and…
0
votes
0 answers

R: Re-colour and connect certain points in a model-plot

This is my first question here so please excuse any mistakes I (may or may not) make. The premise: I got a vegetational dataset containing paired data on different plots for old and new observations. I used the 'openxlsx'-package to load my data,…
0
votes
0 answers

Vegan pkg - diversity for (cover) data per row

I'm trying to calculate Simpson's diversity() index for different species (column headings) however I would need to compare the indices between the two treatments. I have treatments in rows and species in the columns: treatment plot pinus…
lkaarakk
  • 11
  • 3
0
votes
1 answer

Error in pts[groups == i, , drop = FALSE] : (subscript) logical subscript too long - with betadisper()

Hello dear internet community ! I was trying to use the betadisper() function from vegan{} when I encounter a very new issue for me. The error i get is the following : Error in pts[groups == i, , drop = FALSE] : (subscript) logical…
Pinceloup
  • 11
  • 5
0
votes
0 answers

phyloseq complaining about functions missing from vegan

I'm working through this tutorial: https://joey711.github.io/phyloseq/plot_ordination-examples.html In Ubuntu 16.04, I'm getting errors any time I try to use one of the ordination functions. Update: It does work for me in Windows 10, R…
Mark Miller
  • 3,011
  • 1
  • 14
  • 34
0
votes
1 answer

How do you plot rarefaction plots by sampling sites?

Simplified version of my problem: I have an OTU table with with 60 sample points (each with abundances for various OTUs) across three sites: A, B and C. Each site has 20 samples. I want to plot rarefaction curves for each of the sites: A, B and C. I…
0
votes
0 answers

How to do a Mantel test (in VEGAN package) between geography and genetics WHILE leaving out specific observations?

I wish to carry out a mantel test between a matrix of geographical distances in kilometers (matrix 1) and a corresponding matrix of Bray-curtis distances in which I leave out those values with zero geographical distance. (A distance of 0 km…
0
votes
0 answers

Cannonical Correspondence Analysis (CCA) using R

I use R for my data analysis, and I found an error when I use vegan packages for calculating and plotting CCA (Canonical Correspondence Analysis). One of all variable was loose and the eigenvalues different. These is eigenvalues when I use R…