Learn R Programming

fb4package (version 2.0.0)

calculate_body_composition: Calculate complete body composition (Mid-level - Main function)

Description

Main function that calculates all body composition components and energy density from weight and processed parameters

Usage

calculate_body_composition(weight, processed_composition_params)

Value

A named list with 13 elements describing the body composition:

total_weight

Numeric. Total wet weight (g), equal to weight.

water_g

Numeric. Water content (g).

protein_g

Numeric. Protein content (g), estimated from water via Breck (2014) regression.

ash_g

Numeric. Ash content (g), estimated from water via Breck (2014) regression.

fat_g

Numeric. Fat content (g), calculated by subtraction and bounded to [0, max_fat_fraction * weight].

water_fraction

Numeric. Water as a fraction of total weight.

protein_fraction

Numeric. Protein as a fraction of total weight.

ash_fraction

Numeric. Ash as a fraction of total weight.

fat_fraction

Numeric. Fat as a fraction of total weight.

energy_density

Numeric. Energy density (J/g wet weight).

total_energy

Numeric. Total body energy (J).

total_fraction

Numeric. Sum of all four fractions; should be close to 1.

balanced

Logical. TRUE if total_fraction is within 0.05 of 1.

Returns create_empty_composition() when weight <= 0.

Arguments

weight

Total wet weight (g)

processed_composition_params

List with processed composition parameters

Examples

Run this code
params <- list(water_fraction = 0.72, fat_energy = 36450,
               protein_energy = 17990, max_fat_fraction = 0.30)
calculate_body_composition(weight = 100,
                           processed_composition_params = params)

Run the code above in your browser using DataLab