scaleSizeComps: Scale "size" compositions in a dataframe by factor...

View source: R/scaleSizeComps.R

scaleSizeCompsR Documentation

Scale "size" compositions in a dataframe by factor level-specific scalars

Description

Function to scale "size" compositions in a dataframe by factor level-specific scalars.

Usage

scaleSizeComps(
  dfrZCs,
  dfrScalars,
  id.value = "fraction",
  id.scalefacs = "",
  id.scalevalue = "abundance",
  verbose = FALSE
)

Arguments

dfrZCs

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

dfrScalars

- input dataframe with scalars for a subset of the factors in dfrZCs

id.value

- name of column in dfrZCs with (possibly normalized) count/abundance values

id.scalefacs

- character vector of column names of factors for the values in dfrScalars to scale the size compositions in dfrZCs by

id.scalevalue

- name of column in dfrScalars with the values used to scale the size compositions in dfrZCs

verbose

- flag to print diagnostic output to console

Details

The names of columns in dfrScalars used as factors to scale the composition data in dfrZCs should be the same in both datasets.

Value

dataframe with scaled compositions by size (and possibly other factors).


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