Description Usage Arguments Details Value Author(s) See Also
View source: R/compress2matrix.R
Reads 'compressed format' text files giving the species found at particular sites and rewrite them into a sites by species matrix.
1 2 3 | compress2matrix(path, skip = 3, verbose = TRUE,
lump.queries = FALSE,
exclude.taxa = NULL)
|
path |
the directory within which to process all the files that end in '.BB' (which must be capitalized). |
skip |
skip is the number of lines to skip at the beginning of each file, defaulting to 3. |
verbose |
verbose = TRUE (the default) prints diagnostic messages. |
lump.queries |
lump.queries = TRUE treats taxon names/codes that are followed by question marks as if they were the same as the same name/code not followed by a question mark. FALSE (the default) treats queries as separate taxa. |
exclude.taxa |
character vector giving taxon names to exclude. |
Compressed format data has a line of data for each site consisting of tab-separated records, the first two records give the site name; the remaining records are pairs separated by a single space giving species names and counts (species names can be repeated).
The return value of the function is a list including a vector of site names, a vector of taxon names/codes, and a sites-by-species matrix. As a side-product, the function saves (in the directory specified by path) a matrix (tab-delimited text file ending in .MTX) for each locality (.BB file) and the overall sites-by-species matrix as a file named 'SiteBySpp.MTX'.
Walton Green
plot.strat.column
, stratigraph
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.