get_food_details: Method definitions for the FoodDetails Class

Description Usage Arguments Value Examples

Description

Method definitions for the FoodDetails Class

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
get_food_details(
  object,
  target_field = "ingredients",
  result_format = "full",
  nutrients = NULL,
  ...
)

## S4 method for signature 'FoodDetails'
get_food_details(
  object,
  target_field = NULL,
  result_format = "full",
  nutrients = NULL
)

Arguments

object

An object of class FoodSearch

target_field

Target field to extract, can be a vector.

result_format

One of abridged or full. Defaults to full.

nutrients

A numeric vector of nutrient IDs. Defaults to "description"

...

Ignored.

Value

A data.frame of the target field

Examples

1
2
3
4
5
## Not run: 
test_object <-make_object("FoodDetails",fdc_id = 504905)
get_food_details(test_object, "ingredients")

## End(Not run)

Nelson-Gon/rfdc documentation built on Nov. 14, 2021, 3:23 a.m.