Skip to contents

All functions

compare_new_diet()
Compare new diet with current diet
compute_constr()
Compute constraint values for outcomes
compute_std_unit_contrib()
Compute standardised contribution per unit based on coefficients
compute_stdcoef()
Compute standardise coefficients for contribution per unit
compute_total_contrib()
Compute total contribution for outcomes
data_contrib
Demo data: new diet contribution to nutrients and env impact
data_newdiet
Demo data: new diet comparison
f_make_constraint_function()
Make inequality constraint functions based on constraint values
f_make_objective_function()
Make objective function based on current diet
find_new_diet()
New diet discovery
foodname_group
Macro food group (used for plotting purpose)
plot_diet_comparison_gram()
Plotting function for diet comparison summary
plot_diet_comparison_percent()
Plotting function for diet comparison summary
prep_diet_comparison_gram()
Make diet comparison summary table (intake in grams)
prep_diet_comparison_percent()
Make diet comparison summary table (percent change)
prep_validate_table()
Summary table preparation for fast checking constraint fulfilment
reduce_constr()
Compute reduced constraint coefficients
return_new_diet()
Collect results from the new diet discovery
select_diet()
Select a set of foods
select_perunit()
Select contribution per unit for nutrition and environmental impact outcomes
set_constr_coef()
Set constraint coefficients
table_validate()
Make gt table for the diet contribution summary
validate_diet_contrib()
Compare new diet with current diet
values_by_tag_outcome()
Organize input values for outcomes