retrieve | R Documentation |
retrieve
will load an object that was previously stowed via stow
back to the provided R environment.
retrieve(
stowed_object,
keep_name = FALSE,
cleanup = FALSE,
as.data.table = FALSE,
envir = .GlobalEnv,
...
)
stowed_object |
S3 object created by |
keep_name |
Logical value; default is |
cleanup |
Logical value; default is |
as.data.table |
Logical value; if 'fst' method used, returns as a data.table object (requires data.table installed). |
envir |
Location for imported object to be saved. |
... |
Additional arguments based to the read function of the respective method. |
This function will load an object, initially created by stow
, from the hard-drive ('.rds', '.csv', or '.fst' file). retrieve
requires the S3 object output from stow
in order to load the object. This is to ensure the correct location, name, and method are used.
File types of '.rds', '.csv', and '.fst' can be loaded quickly into an R session.
R data object previously stored on hard drive.
## Not run:
# Create fake data
temp_data <- data.frame(col1 = rpois(100, 1), col2 = runif(100))
# Stow an object
temp_data_stowed <- stow(object = temp_data, method = 'fst', cleanup = TRUE)
# Retrieve an object
temp_data <- retrieve(stowed_object = temp_data_stowed, cleanup = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.