rebinSizeComps: Re-bin "size" compositions in a dataframe to all given "size"...

View source: R/rebinSizeComps.R

rebinSizeCompsR Documentation

Re-bin "size" compositions in a dataframe to all given "size" values (and possibly all factor level combinations)

Description

Function to re-bin "size" compositions in a dataframe to all given "size" values (and possibly all factor level combinations).

Usage

rebinSizeComps(
  dfr,
  id.size = "size",
  id.value = NULL,
  id.facs = "",
  cutpts = NULL,
  truncate.low = TRUE,
  truncate.high = FALSE,
  expandToAllFactorCombos = TRUE,
  verbose = FALSE
)

Arguments

dfr

- input dataframe with composition data by "size" and other factors

id.size

- name of column in dfr with "size" data

id.value

- name of column in dfr with count (or abundance) values

id.facs

- character vector of factor column names

cutpts

- vector of cutpoints to use for re-binning size compositions

truncate.low

-flag to truncate size compositions below the minimum size (TRUE) or include in smallest size bin (FALSE)

truncate.high

- flag to truncate size compositions above the maximum size (TRUE) or include in largest size bin (FALSE)

expandToAllFactorCombos

- flag to expand to all factor combinations (TRUE) or only observed combinations (FALSE)

verbose

- flag to print diagnostic output to console

Details

Non-standard column names SHOULD NOT be back-quoted.

Value

dataframe with compositions by size (and possibly other factors) expanded to all sizes by either unique or all factor combinations.


wStockhausen/wtsSizeComps documentation built on March 17, 2024, 3:09 p.m.