View source: R/extract_energy.R
extract_energy | R Documentation |
Helper function to extra the energy content (e.g., kcal or kJ) from the nutrition table of a product that was collected from the oc_collect_nutrition_table function.
Helper function to convert the energy content (e.g., kcal or kJ) extracted from extract_energy function into kcal unit.
extract_energy(data, item, nutrition) extract_kcal(data)
data |
Output from extract_energy function |
item |
Product name column. |
nutrition |
Nutrition table column. |
A tibble with product name and energy content, if available.
A tibble with product name, energy content (if available) and energy content converted into kcal unit.
oc_collect_nutrition_table
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.