ezLoadRobj | R Documentation |
This function loads R objects from files with different extensions (.qs2, .qs, .rds) by automatically detecting the file format based on the extension.
ezLoadRobj(filePath, nthreads = 1L)
filePath |
Character string specifying the path to the R object file. |
nthreads |
Integer specifying how many threads to use for qs/qs2 loading. Default is 1. |
The function checks if the required packages are available (qs2, qs) and loads the appropriate package for the file extension. Supported formats:
.qs2 - Uses qs2::qread() for fastest serialization
.qs - Uses qs::qread() for fast serialization
.rds - Uses base::readRDS() for standard R serialization
The R object stored in the file.
Rehrauer, Hubert
Schmid, Peter
## Not run:
# Load a qs2 file
my_object <- ezLoadRobj("path/to/data.qs2", nthreads=4L)
# Load a qs file
my_object <- ezLoadRobj("path/to/data.qs", nthreads=3L)
# Load an rds file
my_object <- ezLoadRobj("path/to/data.rds")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.