Skip to contents

Food selector based on a bigger table, used to provide current diet information.

Usage

select_diet(data_diet, tag_food, minmax = T)

Arguments

data_diet

Data that contain food (group) names and current diet information.

tag_food

A vector of food names to choose from

minmax

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')
select_diet(data_diet = all_diet, tag_food = foods)
#> # A tibble: 3 × 4
#>   food_name  intake_mean intake_lwr intake_upr
#>   <chr>            <dbl>      <dbl>      <dbl>
#> 1 Bread             188.       18.8       344.
#> 2 Vegetables        166.       16.6       420.
#> 3 Red meat          126.       12.6       300.