DIETCOST1.0.0.0 package

Calculate the Cost and Environmental Impact of a Ideal Diet

add_float_range

Float range

add_range

Discrete range

addConstraintData

Food constraint data addition

addEmissionData

Emission data addition

addFoodGroupsConstraintData

Food group constraint data addition

addNutrientData

Nutrients data addition

addPriceData

Price data addition

calculateGroupedResults

Calculates grouped results for a Monte Carlo Simulation

calculateResults

Calculates results for a Monte Carlo Simulation

check_function

Missing value check

check_id_defined

ID mismatch check

check_match_food_price

Food/price mismatch check

check_match_individual_diet

Individual/diet mismatch check

check_min_exists

Minimum intake food groups check

check_nom_num_df

Applies non-nummeric value check to entire dataframe

check_non_num

Non-numeric check

check_spelling

Spellcheck

check_variety

Variety check

checkLinkedFoods

Linked foods check

checks_optional_food_groups

Optional food groups check

checkZeroDiff

All zero difference check

converts_dataframe

Weekly conversion

convertWeeklyFoodGroups

Food group serves conversion

convertWeeklyNutrientTargets

Nutrient targets conversion

createFoodData

Food data creation

createFoodGroupData

Food group data creation

createNutrientTargets

Nutrients data addition

createRandomMeal

Random meal plan

diff_calc

Difference calculator

energy_conversor

MJ to KJ conversion

foodData

Single-function food dataframe creation

foodGroupData

Single-function food group dataframe creation

getDifference

General difference calculation

getFoodGroupServes

Food group serves calculator

getNutrients

Nutrients values calculator

getPerc

Percentage values calculator

join_function

Join function

monteCarlo

Monte Carlo simulation

monteCarloSimulation

Single-function Monte Carlo simulation and results export.

nutrientDataCalculation

Nutrient data application to random meal plan created

permitted_individuals

Permitted individuals check

pipe

Pipe operator

priceEmissionData

Price/emission data application to random meal plan created

printResults

Exportation of Monte Carlo results

random_plan

Random deletion

redmeat_check

Redmeat flag

remove_suffix

Suffix removal

sample_safe

Safe sampling

sauces_protein_discretionary_change

Sauces, protein and discretionary food groups treatment

standard_name_check

Standard name check

starchy_fill

Starchy vegetables serves addition

treat_df

Pre-treatment of constraint data

treat_groups_df

Treatment of food group constraints dataframe

unique_values

Unique value check

upload_data

Data upload

Easily perform a Monte Carlo simulation to evaluate the cost and carbon, ecological, and water footprints of a set of ideal diets. Pre-processing tools are also available to quickly treat the data, along with basic statistical features to analyze the simulation results — including the ability to establish confidence intervals for selected parameters, such as nutrients and price/emissions. A 'standard version' of the datasets employed is included as well, allowing users easy access to customization. This package brings to R the 'Python' software initially developed by Vandevijvere, Young, Mackay, Swinburn and Gahegan (2018) <doi:10.1186/s12966-018-0648-6>.

  • Maintainer: Henrique Bracarense
  • License: MIT + file LICENSE
  • Last published: 2025-05-09