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
1 answer

R vegan package, betadisper

"Betadisper" calculates the Non-euclidean distances between objects and their group centroids by reducing the original distances to principal coordinates. It is a multivariate analogue of Levene's test for homogeneity of variances.…
IRich
  • 27
  • 2
  • 7
0
votes
1 answer

CCA output problems

So help would be much appreciated! I have already completed a CCA plot which shows 7 sites, about 15 species and 6 environmental variables. However, it is saying that the unconstrained axis is 0 and I cannot complete an ANOVA on my CCA results in…
0
votes
0 answers

Extract residuals from adonis function in vegan package

I am using the adonis function in the vegan package to determine effects of different environmental factors in forest plant community composition in different regions. I would like to first use adonis to remove the region effect, this is, to fit a…
0
votes
0 answers

Vegan NA values are breaking envfit, even with na.rm = T. Example images in post

I am trying to overlay envfit arrows on to an NMDS chart like this one (which is when I replace missing values with fake numbers): However, with our actual data, it doesnt give the arrows but labels each point individually, like this: Any…
Daniel
  • 289
  • 2
  • 14
0
votes
2 answers

Function passing a data.frame and variable to build a formula

I am using vegan package to do some analysis and plots, like this require(vegan) data(varechem) data(varespec) rdam <- rda(varechem,scale=T) scal=2 ef <- envfit(rdam ~ Cal.vul, data = varespec) sf <- ordisurf(rdam ~ Cal.vul, data = varespec, plot…
Leosar
  • 2,010
  • 4
  • 21
  • 32
0
votes
1 answer

vegan package cca error: rowsum(X) must be >0: missing value where TRUE/FALSE needed

I am trying to run a Canonical Correspondence Analysis on diet composition data (prey.counts) with respect to a suite of environmental variables (envvar). Every row and every column sums to greater than 0, but I keep getting this error message: diet…
user3303937
  • 13
  • 2
  • 5
0
votes
2 answers

sampling randomly with conditions

My problem sits inside a loop, I have a large dataset (DF), a subset of which looks like this: ID Site Species 101 4 x 101 4 y 101 4 z 102 6 x 102 6 z 102 6 a 102 6 b 103 6 a 103 6 z 103 …
0
votes
2 answers

R: Species accumulation curve based on variable effort

I am trying to construct a Species Accumulation Curve using a fishery dataset. It can be done easily using packages such as Vegan. However, I'd like construct a curve based on a different type of effort (here number of hooks) than the common type…
Fred
  • 1
  • 2
0
votes
1 answer

Add specific shape and linetype to ellipses for NMDS via ggplot2

As a follow up to this extremely useful question and answer: Color-coding 95% confidence ellipses for centroids I have manage to successfully overlay confidence ellipses for my NMDS plots in ggplot. I want now to specify the colour and shape of the…
Sarah
  • 789
  • 3
  • 12
  • 29
0
votes
1 answer

Adding sites to a DCA in R

I created a Detrended correspondence analysis (DCA) displaying the species using the script below but I'm wanting to add the sites to it. I know I can do this with the simple script of: plot(vare.dca), but not sure how I do this once I have improved…
0
votes
0 answers

missing values (NA) causing TRUE/FALSE error

Running an analysis in RStudio, R version 3.0.1, Ubuntu 12.04. I am correlating environmental factors (envW) to an analysis (MDSnsj) using the function envfit from the vegan package 2.0-8. My environmental dataset (envW) has many missing values. I…
0
votes
1 answer

Including arrows in NMDS plot in R vegan package

I'm using the vegan package to plot a NMDS in R analyzing community similarities. This is based on a community matrix that includes different treatments: NMDS=metaMDS(community_matrix,k=2,trymax=100) plot(NMDS) Could anybody tell me how to I can…
user1182741
  • 93
  • 1
  • 3
  • 7
0
votes
1 answer

Italicizing labels using ordipointlabel function in vegan package

I'm trying to figure out how to produce italicized labels using the ordipointlabel() function from the vegan package in R. My points represent species so I'd like the scientific names to be in italics. Any assistance would be appreciated. Example…
Flammulation
  • 336
  • 2
  • 16
0
votes
2 answers

How to calculate the checkerboard score (C-score) under a null model by vegan package in R

I recently want to follow the checkerboard score under a null model method to calculate the pvalue for co-occurrence analysis as adopted by this paper "Using network analysis to explore co-occurrence patterns in soil microbial…
shuixia100
  • 3
  • 1
  • 4
0
votes
1 answer

vegan::vegdist: Error in double(N * (N - 1)/2) : vector size specified is too large

I have some problems with the vegdist function. I want to calculate a distance matrix with jaccard. I have binary data. The problem is that i have a matrix of 138037 rows (sites) and 89 columns (species). my script…
1 2 3
38
39