Request all the compound information in FooDB based on web crawler

request_foodb_compound_info_crawler(
  url = "https://foodb.ca/compounds",
  sleep = 1,
  pages = c(1:2838)
)

Arguments

url

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

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_crawler(pages = 1)
#> 1  
head(x)
#>    FooDB ID                                    Name         CAS
#> 1 FDB000004     Cyanidin 3-(6''-acetyl-galactoside) 350602-26-5
#> 2 FDB000013     Cyanidin 3-(6''-succinyl-glucoside) 216692-08-9
#> 3 FDB000014 Pelargonidin 3-(6''-succinyl-glucoside)            
#> 4 FDB000024  Petunidin 3-O-(6''-acetyl-galactoside)            
#> 5 FDB000025     Peonidin 3-(6''-acetyl-galactoside)     75-07-0
#> 6 FDB000027     Malvidin 3-(6''-acetyl-galactoside)     75-07-0
#>          FormulaWeight  Mono Mass
#> 1   C23H23O12491.4215 491.1189512
#> 2 C25H25O14549.4576 549.124430508
#> 3 C25H25O13533.4582 533.129515886
#> 4 C24H25O13521.4475 521.129515886
#> 5 C24H25O12505.4481 505.134601264
#> 6  C25H27O13535.4741 535.14516595
#>                                                 Foods Structure
#> 1                 Highbush blueberryLowbush blueberry        NA
#> 2                                          Strawberry        NA
#> 3              CloudberryRed raspberryStrawberryWheat        NA
#> 4                 Highbush blueberryLowbush blueberry        NA
#> 5                 Highbush blueberryLowbush blueberry        NA
#> 6 Canada blueberryHighbush blueberryLowbush blueberry        NA