foodData {DIETCOST} | R Documentation |
Single-function food dataframe creation
Description
Creates foods dataframe, with emission, nutrients, constraints and price data, in a single function.
Usage
foodData(
filepath = filepath,
redmeat_ids,
diets,
max_scale,
emission_cols = NULL,
override_min = NULL
)
Arguments
filepath |
Path in which the dataset, in .xlsx format, is stored.. |
redmeat_ids |
Vector of unique food IDs that are redmeat. |
diets |
Chosen diets. Constraint sheets in foods dataset must be of format 'constraints_DIETNAME_diet_foods', then the parameter passed will be DIETNAME. Can be a vector of diets in format c('DIETNAME1','DIETNAME2',...,'DIETNAMEN'). |
max_scale |
Maximum scale. Default is two. |
emission_cols |
Optional parameter. Emission column names if standard dataset isn't used. |
override_min |
If is not null, overrides all minimum values |
Value
Foods dataframe.
[Package DIETCOST version 1.0.0.0 Index]