Package: DIETCOST 1.0.0.0

Henrique Bracarense

DIETCOST: Calculate the Cost and Environmental Impact of a Ideal Diet

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>.

Authors:Henrique Bracarense [cre, aut], Thais Marquezine [aut], Rafael Claro [aut]

DIETCOST_1.0.0.0.tar.gz
DIETCOST_1.0.0.0.tar.gz(r-4.7-any)DIETCOST_1.0.0.0.tar.gz(r-4.6-any)
DIETCOST_1.0.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
DIETCOST/json (API)

# Install 'DIETCOST' in R:
install.packages('DIETCOST', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/hbracarense/dietcost/issues

Uses libs:
  • openjdk– OpenJDK Java runtime, using Hotspot JIT
Datasets:

On CRAN:

Conda:

openjdk

1.70 score 5 scripts 585 downloads 54 exports 26 dependencies

Last updated from:a523dc8fe7. Checks:4 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK127
source / vignettesOK291
linux-release-x86_64OK127
wasm-releaseOK126

Exports:%>%add_float_rangeadd_rangeaddConstraintDataaddEmissionDataaddFoodGroupsConstraintDataaddNutrientDataaddPriceDatacalculateGroupedResultscalculateResultscheck_functioncheck_id_definedcheck_match_food_pricecheck_match_individual_dietcheck_min_existscheck_nom_num_dfcheck_non_numcheck_spellingcheck_varietycheckLinkedFoodschecks_optional_food_groupscheckZeroDiffconverts_dataframeconvertWeeklyFoodGroupsconvertWeeklyNutrientTargetscreateFoodDatacreateFoodGroupDatacreateNutrientTargetscreateRandomMealdiff_calcenergy_conversorfoodDatafoodGroupDatagetDifferencegetFoodGroupServesgetNutrientsgetPercjoin_functionmonteCarlomonteCarloSimulationnutrientDataCalculationpermitted_individualspriceEmissionDataprintResultsredmeat_checkremove_suffixsample_safesauces_protein_discretionary_changestandard_name_checkstarchy_filltreat_dftreat_groups_dfunique_valuesupload_data

Dependencies:cellrangerclicpp11crayondplyrgenericsgluehmslifecyclemagrittrpillarpkgconfigprettyunitsprogressR6readxlrematchrJavarlangtibbletidyselectutf8vctrswithrxlsxxlsxjars

Readme and manuals

Help Manual

Help pageTopics
Float rangeadd_float_range
Discrete rangeadd_range
Food constraint data additionaddConstraintData
Emission data additionaddEmissionData
Food group constraint data additionaddFoodGroupsConstraintData
Nutrients data additionaddNutrientData
Price data additionaddPriceData
Calculates grouped results for a Monte Carlo SimulationcalculateGroupedResults
Calculates results for a Monte Carlo SimulationcalculateResults
Missing value checkcheck_function
ID mismatch checkcheck_id_defined
Food/price mismatch checkcheck_match_food_price
Individual/diet mismatch checkcheck_match_individual_diet
Minimum intake food groups checkcheck_min_exists
Applies non-nummeric value check to entire dataframecheck_nom_num_df
Non-numeric checkcheck_non_num
Spellcheckcheck_spelling
Variety checkcheck_variety
Linked foods checkcheckLinkedFoods
Optional food groups checkchecks_optional_food_groups
All zero difference checkcheckZeroDiff
Weekly conversionconverts_dataframe
Food group serves conversionconvertWeeklyFoodGroups
Nutrient targets conversionconvertWeeklyNutrientTargets
Food data creationcreateFoodData
Food group data creationcreateFoodGroupData
Nutrients data additioncreateNutrientTargets
Random meal plancreateRandomMeal
Difference calculatordiff_calc
MJ to KJ conversionenergy_conversor
Food groups dataset examplefood_groups
Single-function food dataframe creationfoodData
Single-function food group dataframe creationfoodGroupData
Foods dataset examplefoods
General difference calculationgetDifference
Food group serves calculatorgetFoodGroupServes
Nutrients values calculatorgetNutrients
Percentage values calculatorgetPerc
Join functionjoin_function
Monte Carlo simulationmonteCarlo
Single-function Monte Carlo simulation and results export.monteCarloSimulation
Nutrients dataset examplenutrient_targets
Nutrient data application to random meal plan creatednutrientDataCalculation
Permitted individuals checkpermitted_individuals
Price/emission data application to random meal plan createdpriceEmissionData
Exportation of Monte Carlo resultsprintResults
Random deletionrandom_plan
Redmeat flagredmeat_check
Suffix removalremove_suffix
Safe samplingsample_safe
Sauces, protein and discretionary food groups treatmentsauces_protein_discretionary_change
Standard name checkstandard_name_check
Starchy vegetables serves additionstarchy_fill
Pre-treatment of constraint datatreat_df
Treatment of food group constraints dataframetreat_groups_df
Unique value checkunique_values
Data uploadupload_data