Select contribution per unit for nutrition and environmental impact outcomes
Source:R/step1_input.R
select_perunit.Rd
Select contribution per unit information based on a bigger table.
Arguments
- data_perunit_contrib
Data that contain food (group) names and current diet information.
- tag_food
A vector of food names to choose from
- tag_outcome
Whether to return min and max limit of feasible set for new diet
Examples
foods <- c('Bread', 'Vegetables', 'Red meat')
tag_outcomes <- c('energy', 'protein', 'ghge')
select_perunit(data_perunit_contrib = contrib_per_unit, tag_food = foods, tag_outcome = tag_outcomes)
#> # A tibble: 3 × 4
#> food_name energy protein ghge
#> <chr> <dbl> <dbl> <dbl>
#> 1 Bread 10.7 0.0912 0.00107
#> 2 Vegetables 1.57 0.0149 0.00103
#> 3 Red meat 8.34 0.173 0.0129