request_foodb_compound: Request one specific the compound information in FoodB

request_foodb_compoundR Documentation

Request one specific the compound information in FoodB

Description

Request one specific the compound information in FoodB

Usage

request_foodb_compound(
  url = "https://foodb.ca/compounds",
  compound_id = "FDB000004",
  return_form = c("list", "data.frame")
)

Arguments

url

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

compound_id

compound id. For example, FDB000004.

return_form

data.frame or list.

Value

A data frame or list.

Author(s)

Xiaotao Shen shenxt1990@outlook.com

Examples

x = request_foodb_compound( compound_id = "FDB000004", return_form = "list")
x[1:2]
y = request_foodb_compound(compound_id = "FDB000004", return_form = "data.frame")
head(y)

tidymass/massdatabase documentation built on Oct. 18, 2024, 3:56 p.m.