save_large_object: Saves arbitrary large object to disk using saveRDS. If...

Description Usage Arguments Value

View source: R/save_objects.R

Description

Saves arbitrary large object to disk using saveRDS. If compression is 'xz', then the file is first saved quickly with no compression, and then the background process is spawned that compresses the file in multithreaded fassion using 'pxz', if the program is available.

Usage

1
2
3
4
save_large_object(obj, file, compress = "xz", wait_for = c("save",
  "compress", "none"), flag_use_tmp_storage = FALSE,
  fn_to_run_after_save = NULL, fn_to_run_after_compress = NULL,
  parallel_cpus = NULL, flag_detach = FALSE)

Arguments

obj

The object to be saved

file

Path to the file

compress

Compression method with the same meaning as saveRDS. Default is 'xz'.

wait

If set the function exits only after the object is available to read.

fn_to_run_afters_save

Function that will be run after save. The function will get a single argument - path to the newly created file

Value

parallel job with the backgroud save, if wait is not 'none'


adamryczkowski/objectstorage documentation built on May 24, 2019, 8:47 p.m.