convertWeeklyNutrientTargets {DIETCOST}R Documentation

Nutrient targets conversion

Description

Converts nutrient targets dataframe to weekly values.

Usage

convertWeeklyNutrientTargets(df, diet, person, nutrient_constraints = NULL)

Arguments

df

Nutrient targets dataframe.

diet

Chosen diet. Must be DIETNAME from 'constraints_DIETNAME_diet_foods' sheet in dataset.

person

Individual whose random meal plan will be created to. Can be one of man, woman, boy or girl.

nutrient_constraints

Optional parameter. Vector of nutrients column names to be used if not all nutrients are to be used as constraints.

Value

Converted nutrient targets dataframe.

Examples

nutrient_targets_wk <- convertWeeklyNutrientTargets(DIETCOST::nutrient_targets, 'C', 'man')

[Package DIETCOST version 1.0.0.0 Index]