View source: R/calcSizeComps.R
calcSizeComps | R Documentation |
Function to create a dataframe of "size" compositions from a dataframe with count data.
calcSizeComps(
dfrZ,
id.size = "size",
id.value = "abundance",
id.facs = "",
cutpts = NULL,
truncate.low = FALSE,
truncate.high = FALSE,
expandToAllFactorCombos = FALSE,
normalize = FALSE,
id.normfacs = "",
rescale = FALSE,
dfrScalars = NULL,
id.scalevalue,
id.scalefacs = id.normfacs,
verbose = FALSE
)
dfrZ |
- input dataframe with count/abundance data by size and other factors |
id.size |
- name of column in dfr with "size" data |
id.value |
- name of column in dfrZ with count (or abundance) values |
id.facs |
- character vector of column names to use as factors in calculating size compositions |
cutpts |
- cut points for size bins |
truncate.low |
-flag to truncate counts/abundance below the minimum size or include in first size bin (FALSE) |
truncate.high |
- flag to truncate counts/abundance above the maximum size (TRUE) or include in final size bin (FALSE) |
expandToAllFactorCombos |
- flag (T/F) to expand size comps to include all factor combinations |
normalize |
- flag (T/F) to normalize size comps (i.e., sum to 1 acorss normalizing factors) |
id.normfacs |
- character vector of column names of factors to normalize the size compositions across when scaling to total abundance |
rescale |
- flag to rescale size compositions by factor combination using scalars in dfrA |
dfrScalars |
- [optional] input dataframe with scalars to apply by a subset of the factors in dfr |
id.scalevalue |
- column name for scale value in dfrA |
id.scalefacs |
- character vector of column names of factors in dfrA to scale the size compositions across |
verbose |
- flag to print diagnostic output to console |
Non-standard column names should be back-quoted. The names of columns (id.normfacs) used to normalize the composition data in dfrZ prior to expanding to total abundance using dfrScalars should represent the same factors (id.scalefacs) and levels in both datasets.
dataframe with summed counts (or abundance) as compositions by size (and possibly other factors).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.