View source: R/make_register.R
| make_register | R Documentation | 
make_with_sourceIt is sometimes useful to have access to certain objects which are generated as side-products in a source script which yields as a main-product one or more targets. Typically these objects are used for checking that the targets were produced as expected.
make_register(value, name, quiet = FALSE)
| value | A value to be registered in a source script and returned as part
of the  | 
| name | A variable name, given as a character string. No coercion is done, and the first element of a character vector of length greater than one will be used, with a warning. | 
| quiet | A logical determining whether or not warnings are signaled when
 | 
value invisibly
## Not run: 
  # Imagine this is part of your source script:
  x <- readRDS("input.Rds")
  x <- do_stuff(x)
  chk <- do_check(x)
  make_register(chk, "x_check")
  saveRDS(x, "output.Rds")
  # You will have access to `chk` in your pipeline script:
  step_one <- make_with_source(
    "source.R",
    "output.Rds",
    "input.Rds",
  )
  step_one$result$chk
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.