ConvertConcentration: Convert Concentration Basis

Description Usage Arguments Details Value Author(s) Examples

View source: R/ConvertConcentration.R

Description

Change the unit basis for a sample concentration, such as ng/g wet weight to ng/g dry weight, or pg/g lipid weight to pg/g wet weight.

Usage

1
ConvertConcentration(x, convert, percent)

Arguments

x

numeric value. The concentration to be converted.

convert

character string. One of wet.to.dry, dry.to.wet, wet.to.lipid, or lipid.to.wet. See details.

percent

numeric value. Either the percent moisture or percent lipid. See details.

Details

The convert argument specifies the type of conversion, for example wet.to.dry is wet weight basis to dry weight basis.

Conversion between wet weight basis and dry weight basis requires percent to equal the percent moisture in the sample. Conversion between wet weight basis and lipid weight basis requires percent to equal the percent lipid in the sample. The following definitions for percent moisture and percent lipid are used.

percent moisture = ((wet weight - dry weight) / wet weight) * 100

percent lipid = (lipid weight / wet weight) * 100

The unit prefixes (for example ng/g or pg/g) are not changed by the conversion.

Value

Numeric vector of length 1. The unit prefixes are the same as for x, only the concentration basis is converted.

Author(s)

Nathan G. Dodder

Examples

1
2
3
4
## Convert a concentration of 15.3 ng/g wet weight,
## 5 percent lipid, to ng/g lipid weight.

ConvertConcentration(15.3, "wet.to.lipid", 5)

Example output

[1] 306

OrgMassSpecR documentation built on May 2, 2019, 6:48 p.m.