qs_readm {qs2} | R Documentation |
qs_readm
Description
Reads an object in a file serialized to disk using qs_savem()
.
Usage
qs_readm(file, env = parent.frame(), ...)
Arguments
file |
The file name/path. |
env |
The environment where the data should be loaded. Default is the calling environment ( |
... |
additional arguments will be passed to qs_read. |
Details
This function extends qs_read to replicate the functionality of base::load()
to load multiple saved objects into your workspace.
Value
Nothing is explicitly returned, but the function will load the saved objects into the workspace.
Examples
x1 <- data.frame(int = sample(1e3, replace=TRUE),
num = rnorm(1e3),
char = sample(starnames$`IAU Name`, 1e3, replace=TRUE),
stringsAsFactors = FALSE)
x2 <- data.frame(int = sample(1e3, replace=TRUE),
num = rnorm(1e3),
char = sample(starnames$`IAU Name`, 1e3, replace=TRUE),
stringsAsFactors = FALSE)
myfile <- tempfile()
qs_savem(x1, x2, file=myfile)
rm(x1, x2)
qs_readm(myfile)
exists('x1') && exists('x2') # returns true
[Package qs2 version 0.1.5 Index]