add_recipe: Add Recipe to Generate Endpoints

View source: R/recipes.R

add_recipeR Documentation

Add Recipe to Generate Endpoints

Description

Add a recipe to a WORCS project file to generate its endpoints.

Usage

add_recipe(
  worcs_directory = ".",
  recipe = "rmarkdown::render('manuscript/manuscript.Rmd')",
  terminal = FALSE,
  verbose = TRUE,
  ...
)

Arguments

worcs_directory

Character, indicating the WORCS project directory to which to save data. The default value "." points to the current directory. Default: '.'

recipe

Character string, indicating the function call to evaluate in order to reproduce the endpoints of the WORCS project.

terminal

Logical, indicating whether or not to evaluate the recipe in the terminal (TRUE) or in R (FALSE). Defaults to FALSE

verbose

Logical. Whether or not to print status messages to the console. Default: TRUE

...

Additional arguments.

Value

No return value. This function is called for its side effects.

See Also

add_endpoint snapshot_endpoints check_endpoints

Examples

# Create directory to run the example
old_wd <- getwd()
test_dir <- file.path(tempdir(), "add_recipe")
dir.create(test_dir)
setwd(test_dir)
file.create(".worcs")
writeLines("test", "test.txt")
add_recipe()
# Cleaning example directory
setwd(old_wd)
unlink(test_dir, recursive = TRUE)

worcs documentation built on Sept. 14, 2024, 5:06 p.m.