Skip to contents

Select contribution per unit information based on a bigger table.

Usage

select_perunit(data_perunit_contrib, tag_food, tag_outcome)

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

Value

A dataframe with food names and diet intake for selected foods

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