Description Usage Arguments Value Author(s) See Also Examples
Given a baseline dataset, this function extracts a sub-dataset for a given taxomic group and/or sampling scheme, defined either by a sampling interval (periodicity) or by a window size (consecutive sampling days each time) and a gap size (gaps between sampling windows).
1 2 3 4 |
dataset |
name of the matrix or dataframe to analyze |
sampl.columns |
index numbers of the (consecutive) columns containing the baseline (daily) sampling data, e.g. 3:180 |
sampl.interval |
interval at which to extract sampling data, e.g. 5 (to take one every five samples) |
window.size |
instead of sampl.interval (for one sampling every so many time units), size (in sampling time units, e.g. days) of each sampling window (e.g. 3 for 3 consecutive days sampling each time); must be complemented with |
gap.size |
size (in sampling time units, e.g. days) of the gaps between sampling windows – e.g. 1 for 1 gap (non-sampled) day between sampling windows. |
start.column |
column of sampl.columns where to actually start the sampling (e.g. with a gap size of 1 between sampling windows, the start column can be either 1 or 2) |
group.column |
name or index number of the column containing the taxa or groups to analyse, e.g. 3 or "Family" |
group.names |
name(s) of the group(a) to extract, e.g. c("Mustelidae", "Procyonidae"); if NULL (the default), all groups in group.names are extracted |
remove.zeros |
logical indicating whether to remove rows where all extracted days have zero observations |
keep.nonsampl.columns |
logical indicating whether to keep the non-sampling columns in the extracted result |
This function returns a subset of dataset
containing the taxonomic groups and sampling columns resulting from the given sampling scheme.
A. Marcia Barbosa, J. Tiago Marques
1 2 3 4 5 6 7 8 9 10 11 12 | data(roadkills)
submat1 <- submatrix(dataset = roadkills, sampl.columns = 4:ncol(roadkills),
sampl.interval = 3, start.column = 1, group.column = "taxon", group.names = NULL)
head(submat1)
submat2 <- submatrix(dataset = roadkills, sampl.columns = 4:ncol(roadkills),
window.size = 5, gap.size = 2, start.column = 1, group.column = "taxon",
group.names = NULL)
head(submat2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.