Skip to contents

Retrieves a Recipe object from the API based on specified criteria.

Usage

get_recipe(
  svy_type = NULL,
  svy_edition = NULL,
  topic = NULL,
  allowMultiple = TRUE
)

Arguments

svy_type

A character string specifying the survey type.

svy_edition

A character string specifying the survey edition.

topic

A character string specifying the topic of the recipe.

allowMultiple

A logical value indicating whether to allow multiple recipes.

Value

A Recipe object or a list of Recipe objects.

Details

This function queries the API to retrieve recipes matching the specified criteria.

Examples

# Example of retrieving a Recipe object from the API
recipe_obj <- get_recipe(svy_type = "eaii", svy_edition = "2019-2021")
#> The API returned 1 recipes
print(recipe_obj)
#> <Recipe>
#>   Public:
#>     bake: FALSE
#>     clone: function (deep = FALSE) 
#>     default_engine: data.table
#>     depends_on: NULL
#>     description: NULL
#>     doi: NULL
#>     edition: 2019-2021
#>     id: 6631cbf0c2086c4fb5adfcde
#>     initialize: function (name, edition, survey_type, default_engine, depends_on, 
#>     name: Decreto Nº 504/007 para la cantidad de trabajadores
#>     steps: call
#>     survey_type: eaii
#>     topic: Decreto Nº 504/007
#>     user: Equipo de Evaluación y Monitoreo, ANII