temp <- tempfile()
write_rds(mtcars, temp)
read_rds(temp)
## Not run: ------------------------------------
# write_rds(mtcars, "compressed_mtc.rds", "xz", compression = 9L)
## ---------------------------------------------
Run the code above in your browser using DataLab