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

Ordihull label with single occurrence

I would like to plot goups for my ordination using the function ordihull in vegan. However I have some sites with only one occurence. Using ordihull this sites do not appear in the plot. See the example below, when only one site has BF as…
mace
  • 490
  • 1
  • 7
  • 24
0
votes
1 answer

ggplot2 for procrustes rotation in vegan

I want to plot procrustes rotations between to RDA-objects obtained by vegan with ggplot2. library(vegan) #perform two RDAs, do procrustes: pro.test <- procrustes(rda.t1,rda.t2) I extracted the x,y coordinates from list of class "procrustes" and…
nouse
  • 3,315
  • 2
  • 29
  • 56
0
votes
1 answer

Reproducing results from Ordistep

Relatively new to R and first time posting so my apologies if there is something missing in my question. I'm using Vegan's ordistep function for variable selection using the default "both" direction method. I'm using a Hellinger transformed Species…
mestaki
  • 49
  • 4
0
votes
0 answers

Merge by average and plot alternate data from table

I used estimateR (vegan) to generate this table from mothur outputs. However, so far, I am unable to go on with this, being that I am not aware of how to plot from tables... row.names ALG.1 ALG.2 ALG.3 ALG.4 ALG.4 ALG.5 ALG.6 ALG.7 …
André Soares
  • 309
  • 1
  • 13
0
votes
1 answer

cca using vegan : no unconstrained inertia

I run a CCA analysis using vegan with 7500 sites, 9 species and 5 constrains variable. The results are > Call: cca(sitspe = Yp, sitenv = Xp) Inertia Proportion Rank Total Constrained 0.5051 …
0
votes
1 answer

Rarefaction with specaccum in R

I have a question concerning the rarefaction method in the specaccumfucntion in R. I have the following dataset Species1 Species2 Species3 ... Species75 10 20 5 ... 7 And I am trying to plot a curve with on the x-axis the…
Victor
  • 41
  • 1
  • 1
  • 7
0
votes
1 answer

Using vegan package: Pielou similarity cannot log output

I am creating a dataframe of different richness in vegan. I run into trouble with Pielou as I need to log previously created "pumice.richness" data to achieve this result and get error below: analysis <- function(havreanosim,…
0
votes
1 answer

adonis function from vegan doesn't work

I've got a problem fighting one error. Here is the line I try to execute: library(vegan) adonis(data = dset, adiv ~ N+P+K) It returns a failure message: Error in rowSums(x, na.rm = TRUE) : 'x' must be an array of at least two…
Eli Korvigo
  • 10,265
  • 6
  • 47
  • 73
0
votes
1 answer

Changing permutation number in rda anova

I'm trying to test the overall significance of an rda model using the anova() function, but I've realized that, if I run the anova multiple times, not only does it give a different p-value every time, but it also gives different permutation…
feznander
  • 1
  • 1
0
votes
2 answers

plotting variables of procrustes analysis in r?

I have performed non-metric multidimensional scaling (NMDS) on two data frames, each containing different variables but for the same sites. I am using the vegan package: > head (ResponsesS3) R1_S3 R10_S3 R11_S3 R12_S3 R2_S3 R3_S3 R4_S3 R6_S3…
Sky
  • 93
  • 2
  • 5
0
votes
1 answer

Cropped linestack plot (vegan)

Problem: I am using the linestack plot from the vegan package. For higher number of data/labels the plot gets cropped. Reproducable Example: library(vegan) linestack(x= 1:100, labels = 1:100) Question: How can I get the complete plot including all…
user2030503
  • 3,064
  • 2
  • 36
  • 53
0
votes
0 answers

Changing the environmental variable vector arrow lengths in constrained ordination

I'm trying to produce biplots from constrained ordinations (dbRDA to be exact) and I would like to re-scale the lengths of the vector arrows. plot and ordiplot commands in vegan automatically scale the constraint vector arrows to fit the figure and…
AKa
  • 1
0
votes
1 answer

CCA Analysis: Error in weighted.mean.default(newX[, i], ...) : 'x' and 'w' must have the same length

I'm very new to R and this might be a very silly question to ask but I'm quite stuck right now. I'm currently trying to do a Canonical Correspondence Analysis on my data to see which environmental factors have more weight on community distribution.…
Edu VO
  • 1
  • 1
  • 2
0
votes
0 answers

How to add estimators (Chao1, Chao2, ACE and ICE ) to the Species Accumulation Graph

I have the following script that shows the plot of the accumulation curves for a forest environments, I would love to integrate the Chao1, Chao2, ACE and ICE indicators Graph (the matrix resulting of using 'fossil' packe function spp.est(x)) in the…
Leonardo
  • 2,484
  • 2
  • 25
  • 37
0
votes
1 answer

cca per groups and row.names

I am somewhat new to R, so forgive my basic questions. I perform a CCA on a full dataset (358 sites, 40 abiotic parameters, 100 species observation). library(vegan) env <- read.table("env.txt", header = TRUE, sep = "\t", dec = ",") otu <-…
nouse
  • 3,315
  • 2
  • 29
  • 56