checkRdaFiles | R Documentation |
This reports for each of the files produced by save
the size,
if it was saved in ASCII or XDR binary format, and if it was
compressed (and if so in what format).
Usually such files have extension ‘.rda’ or ‘.RData’, hence the name of the function.
checkRdaFiles(paths) resaveRdaFiles(paths, compress = c("auto", "gzip", "bzip2", "xz"), compression_level, version = NULL)
paths |
A character vector of paths to |
compress, compression_level |
Type and level of compression: see
|
version |
The format to be used when re-saving: see
|
compress = "auto"
asks R to choose the compression and ignores
compression_level
. It will try "gzip"
, "bzip2"
and if the "gzip"
compressed size is over 10Kb, "xz"
and
choose the smallest compressed file (but with a 10% bias towards
"gzip"
). This can be slow.
For back-compatibility, version = NULL
is interpreted to mean
version 2: however version-3 files will only be saved as version 3.
For checkRdaFiles
, a data frame with rows names paths
and columns
size |
numeric: file size in bytes, |
ASCII |
logical: true for save(ASCII = TRUE), |
compress |
character: type of compression. One of |
version |
integer: positive with the version(s) of the
|
## Not run: ## from a package top-level source directory paths <- sort(Sys.glob(c("data/*.rda", "data/*.RData"))) (res <- checkRdaFiles(paths)) ## pick out some that may need attention bad <- is.na(res$ASCII) | res$ASCII | (res$size > 1e4 & res$compress == "none") res[bad, ] ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.