Request all the food information in FoodB

request_foodb_compound_info(
 
    url = c("https://raw.githubusercontent.com/jaspershen/databases/main/data/foodb_compound_info.rda",
    "https://foodb.ca/downloads", "https://foodb.ca/compounds"),
  sleep = 1,
  pages = 1:2838
)

Arguments

url

Default is "https://foodb.ca/downloads".

sleep

sleep default is 1 second.

pages

default is from 1:2838

Value

A data frame.

Author

Xiaotao Shen shenxt1990@outlook.com

Examples

x = request_foodb_compound_info()
head(x)
#> # A tibble: 6 × 2
#>   public_id name                                   
#>   <chr>     <chr>                                  
#> 1 FDB000004 Cyanidin 3-(6''-acetyl-galactoside)    
#> 2 FDB000013 Cyanidin 3-(6''-succinyl-glucoside)    
#> 3 FDB000014 Pelargonidin 3-(6''-succinyl-glucoside)
#> 4 FDB000024 Petunidin 3-O-(6''-acetyl-galactoside) 
#> 5 FDB000025 Peonidin 3-(6''-acetyl-galactoside)    
#> 6 FDB000027 Malvidin 3-(6''-acetyl-galactoside)