Compress saved R Objects

util_compress(
  dir = getwd(),
  recursive = FALSE,
  format = "Rds",
  pattern = "^filename.*",
  compress = "xz",
  par = TRUE,
  ncores = NULL
)

Arguments

dir

Character string. Directory which contains target files.

recursive

Logical. Search files recursively under dir.

format

Character string. "Rda", "rda", "RDA", "RData", "Rdata", "rdata", "RDATA" for R Data Format. "Rds", "rds", "RDS" for serialized R object.

pattern

Character string. Regular expression. Pattern of file names. format is appended as an extension. For example, if pattern = "^filename.*", and format = "Rds", the pattern used to load files will be "^filename.*\\.Rds$".

compress

Character string. Compression type (gzip, bzip2 or xz).

par

Logical. If TRUE, use multiple cores.

ncores

Integer. Number of cores to use if par = TRUE. If unspecified, defaults to detectCores() - 1.

Author

Ivan Jacob Agaloos Pesigan