I have data of species at 4 sites over several months. I have successfully created accumulation graphs using package vegan
in R but I would like to plot all 4
You can just use the add=T
argument in plot.specaccum(...)
library(vegan)
data(BCI)
df <- lapply(c(1,21,41,61,81),function(i)specaccum(BCI[,seq(i,i+19)], method="random"))
plot(df[[1]])
for (i in 2:5) plot(df[[i]],add=T, col=i)
This code snippet just loads the built-in BSI dataset in vegan
, and creates a list of 5specaccum
objects by running specaccum(...)
on a subset of the columns in BCI. You don't need to to this since you already have the specaccum objects.
Then, we create the first plot, and add each new curve with add=T
.