powered by
Takes a sparse matrix data frame (typical of ecological abundance data) and converts it into three column database format.
dematrify(comm, filename, sep = ",", thresh = 0)
a data.frame with the first column the sample ID, the second column the taxon ID, and the third column the abundance.
a sparse data.frame or matrix, with samples as rows and comm as columns
the name of the filename to produce
the separator to use in separating columns
the minimum abundance to be included in the output
David W. Roberts droberts@montana.edu http://ecology.msu.montana.edu/droberts/droberts.html
The routine is pure R code to convert data from sparse matrix form to three column database form for export or reduced storage
matrify
library(labdsv) data(bryceveg) x <- dematrify(bryceveg)
Run the code above in your browser using DataLab