| gjamTrimY | R Documentation |
Returns a list that includes a subset of columns in y. Rare species can be aggregated into a single class.
gjamTrimY(y, minObs = 2, maxCols = NULL, OTHER = TRUE)
y |
|
minObs |
minimum number of non-zero observations |
maxCols |
maximum number of response variables |
OTHER |
|
Data sets commonly have many responses that are mostly zeros, large numbers of rare species, even singletons. Response matrix y can be trimmed to include only taxa having > minObs non-zero observations or to <= maxCol total columns. The option OTHER is recommended for composition data ('CC', 'FC'), where the 'other' column is taken as the reference class. If there are unidentified species they might be included in this class. [See gjamSimData for typeName codes].
Returns a list containing three elements.
|
trimmed version of |
|
length- |
|
number of non-zero observations by column in |
James S Clark, jimclark@duke.edu
Clark, J.S., D. Nemergut, B. Seyednasrollah, P. Turner, and S. Zhang. 2017. Generalized joint attribute modeling for biodiversity analysis: Median-zero, multivariate, multifarious data. Ecological Monographs 87, 34-56.
gjamSimData simulates data
gjam analyzes data
A more detailed vignette is can be obtained with:
browseVignettes('gjam')
web site 'http://sites.nicholas.duke.edu/clarklab/code/'.
## Not run:
library(repmis)
source_data("https://github.com/jimclarkatduke/gjam/blob/master/forestTraits.RData?raw=True")
y <- gjamReZero(fungEnd$yDeZero) # re-zero data
dim(y)
y <- gjamTrimY(y, minObs = 200)$y # species in >= 200 observations
dim(y)
tail(colnames(y)) # last column is 'other'
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.