I plan to use the iNEXT function (from the iNEXT package) to analyse potential differences between two pond types. These data are presence/absence and in a sites by species matrix e.g.
Pond.type <- c("A", "A", "A", "B", "B", "B")
Sample.no <- c(1,2,3,1,2,3)
Species1 <- c(0,1,1,1,0,0)
Species2 <- c(0,1,1,0,1,0)
Species3 <- c(1,1,1,1,0,1)
Species4 <- c(0,1,0,1,0,0)
Species5 <- c(1,1,1,0,0,0)
mydata <- cbind.data.frame(Pond.type, Sample.no, Species1, Species2, Species3, Species4, Species5)
If I split my data frame into pond types and keep these as matrices I can run the function, e.g. iNEXT(pond.type.a.dataframe)
, but then I cannot compare between the different pond types on one plot.
My question is, is there a way to convert my data into the same format as the ciliates example data provided in the iNEXT library? This is given as a list of matrices.