if (FALSE) {
obj_dir <- file.path(tempdir(), "obj")
# Write a data frame as a file
write_obj(
obj = mtcars,
file = "mtcars_data",
target_dir = obj_dir
)
# Read the file back into an R session
my_mtcars <- dget(file.path(obj_dir, "mtcars_data"))
unlink(obj_dir)
}
Run the code above in your browser using DataLab