Skip to contents

Returns the food code, name, and food group for all 528 foods, sourced from the proximate table.

Usage

list_foods(pattern = NULL)

Arguments

pattern

Optional substring to filter food names (case-insensitive).

Value

A tibble with columns food_code, food_name, food_group.

Examples

list_foods()
#>  528 foods found.
#> # A tibble: 528 × 3
#>    food_code food_name                                         food_group       
#>    <chr>     <chr>                                             <chr>            
#>  1 A001      "Amaranth seed, black (Amaranthus cruentus)"      Cereals and Mill…
#>  2 A002      "Amaranth seed, pale brown (Amaranthus cruentus)" Cereals and Mill…
#>  3 A003      "Bajra (Pennisetum typhoideum)"                   Cereals and Mill…
#>  4 A004      "Barley (Hordeum vulgare)"                        Cereals and Mill…
#>  5 A005      "Jowar (Sorghum vulgare)"                         Cereals and Mill…
#>  6 A006      "Maize, dry (Zea mays)"                           Cereals and Mill…
#>  7 A007      "Maize, tender, local (Zea mays)"                 Cereals and Mill…
#>  8 A008      "Maize, tender, sweet (Zea mays)"                 Cereals and Mill…
#>  9 A009      "(Chenopodium quinoa)\nQuinoa"                    Cereals and Mill…
#> 10 A010      "Ragi (Eleusine coracana)"                        Cereals and Mill…
#> # ℹ 518 more rows
list_foods("spinach")
#>  1 food found.
#> # A tibble: 1 × 3
#>   food_code food_name                   food_group            
#>   <chr>     <chr>                       <chr>                 
#> 1 C033      Spinach (Spinacia oleracea) Green Leafy Vegetables