calcSizeComps: Create "size" compositions from a dataframe with count data

Description Usage Arguments Details Value

View source: R/calcSizeComps.R

Description

Function to create a dataframe of "size" compositions from a dataframe with count data.

Usage

1
2
3
4
5
6
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)

Arguments

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

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)

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.scalefacs

- character vector of column names of factors in dfrA to scale the size compositions across

verbose

- flag to print diagnostic output to console

minSize

- min "size" cutpoint for binning counts/abundance

maxSize

- max "size" cutpoint for binning counts/abundnce

binSize

- bin "size"

id.scalevalaue

- column name for scale value in dfrA

Details

Non-standard column names should be back-quoted. The names of columns used to normalize the composition data in dfrZ prior to expanding to total abundance using dfrA (id.normfacs) should represent the same factors and levels in both datasets.

Value

dataframe with summed counts (or abundance) as compositions by size (and possibly other factors).


wStockhausen/wtsSizeComps documentation built on Aug. 19, 2018, 3:45 a.m.