View source: R/rxp_read_load.R
| rxp_read | R Documentation |
Reads the output of derivations in the current session, returns a path if reading directly is not possible.
rxp_read(derivation_name, which_log = NULL, project_path = ".")
derivation_name |
Character, the name of the derivation. |
which_log |
Character, defaults to NULL. If NULL the most recent build log is used. If a string is provided, it's used as a regular expression to match against available log files. |
project_path |
Character, defaults to ".". Path to the root directory of the project. |
When derivation_name points to a single R object,
it gets read in the current session using readRDS().
If it's a Python object and {reticulate} is available,
reticulate::py_load_object() is used. In case
the derivation is pointing to several outputs (which can
happen when building a Quarto document for example) or
neither readRDS() nor reticulate::py_load_object()
successfully read the object, the path to the object is
returned instead.
The derivation's output.
Other utilities:
print.rxp_derivation(),
rxp_check_chronicles(),
rxp_copy(),
rxp_gc(),
rxp_init(),
rxp_inspect(),
rxp_list_logs(),
rxp_load(),
rxp_trace()
## Not run:
mtcars <- rxp_read("mtcars")
# Read from a specific build log
mtcars <- rxp_read("mtcars", which_log = "2025-05-10")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.