normalizeSizeComps: Normalize "size" compositions across a set of factors

View source: R/normalizeSizeComps.R

normalizeSizeCompsR Documentation

Normalize "size" compositions across a set of factors

Description

Function to create a dataframe of "size" compositions normalized (summing to 1) across a set of factors.

Usage

normalizeSizeComps(
  dfr,
  id.size = "size",
  id.value = "count",
  id.facs = "",
  id.normfacs = "",
  verbose = FALSE
)

Arguments

dfr

- 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 dfr with count (or abundance) values

id.facs

- character vector of column names used as factors in calculating the size compositions

id.normfacs

- character vector of column names of factors to normalize the size compositions across (a subset of id.facs)

verbose

- flag to print diagnostic output to console

Details

Note that unnormalized size compositions, as well as "raw" count data, can be converted to normalized size compositions using this function.

Value

dataframe with "size" compositions normalized to sum to 1 across a set of factors.


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