Skip to contents

Retrieves data from every IFCT table for a single food and returns a named list of tibbles, one per table that contains a match. Tables with no match are omitted.

Usage

food_profile(food, match = c("fixed", "regex"))

Arguments

food

Food name (substring) or exact food code.

match

One of "fixed" (default) or "regex".

Value

A named list of tibbles, one per IFCT table.

Examples

profile <- food_profile("Bengal gram")
#>  "Bengal gram, dal (Cicer arietinum)" [B001] -- Grain Legumes -- 11 tables found.
profile$amino_acids
#> # A tibble: 1 × 21
#>   `Food code` `Food name` `No. of region` `Histidine_HIS(g)` `Isoleucine_ILE(g)`
#>   <chr>       <chr>       <chr>                        <dbl>               <dbl>
#> 1 B001        Bengal gra… 6                             2.39                4.25
#> # ℹ 16 more variables: `Leucine_LEU(g)` <dbl>, `Lysine_LYS(g)` <dbl>,
#> #   `Methionine_MET(g)` <dbl>, `Cysteine_CYS(g)` <dbl>,
#> #   `Phenylalanine_PHE(g)` <dbl>, `Threonine_THR(g)` <dbl>,
#> #   `Tryptophan_TRP(g)` <dbl>, `Valine_VAL(g)` <dbl>, `Alanine_ALA(g)` <dbl>,
#> #   `Arginine_ARG(g)` <dbl>, `AsparticAcid_ASP(g)` <dbl>,
#> #   `GlutamicAcid_GLU(g)` <dbl>, `Glycine_GLY(g)` <dbl>,
#> #   `Proline_PRO(g)` <dbl>, `Serine_SER(g)` <dbl>, `Tyrosine_TYR(g)` <dbl>
profile$proximate
#> # A tibble: 1 × 12
#>   `Food code` `Food name`        `No. of region` `Water(g)` `Protein_PROTCNT(g)`
#>   <chr>       <chr>                        <dbl>      <dbl>                <dbl>
#> 1 B001        Bengal gram, dal …               6       9.18                 21.6
#> # ℹ 7 more variables: `Ash(g)` <dbl>, `TotalFat_FATCE(g)` <dbl>,
#> #   `TotalDietaryFibre_FIBTG(g)` <dbl>, `InsolubleFibre_FIBINS(g)` <dbl>,
#> #   `SolubleFibre_FINSOL(g)` <dbl>, `AvailableCarbohydrate_CHOAVLDF(g)` <dbl>,
#> #   `Energy_ENERC(KJ)` <dbl>