write_rds {readr} | R Documentation |
Consistent wrapper around saveRDS
. write_rds
does not
compress by default as space is generally cheaper than time.
write_rds(x, path, compress = c("none", "gz", "bz2", "xz"), ...)
x |
R object to write to serialise. |
path |
Path to write to. |
compress |
Compression method to use: "none", "gz" ,"bz", or "xz". |
... |
Additional arguments to connection function. For example, control
the space-time trade-off of different compression methods with
|
The input x
, invisibly.
## Not run: write_rds(mtcars, "mtcars.rds") write_rds(mtcars, "compressed_mtc.rds", "xz", compression = 9L) ## End(Not run)