rxCompressXdf: Compress .xdf files
Compress one or more .xdf files
rxCompressXdf(inFile, outFile = NULL, xdfCompressionLevel = 1, overwrite = FALSE, reportProgress = rxGetOption("reportProgress"))
An .xdf file name, an RxXdfData data source, a directory containing .xdf files, or a vector of .xdf file names or RxXdfData data sources to compress
An .xdf file name, an RxXdfData data source, a directory, or a vector of .xdf file names or RxXdfData data sources to contain the compressed files.
integer in the range of -1 to 9. The higher the value, the greater the amount of compression - resulting in smaller files but a longer time to create them. If
xdfCompressionLevel is set to 0, there will be no compression and files will be compatible with the 6.0 release of Revolution R Enterprise. If set to -1, a default level of compression will be used.
outFile is specified and is different from
overwrite must be set to
TRUE in order to have
integer value with options:
0: no progress is reported.
1: the number of processed rows is printed and updated.
2: rows processed and timings are reported.
3: rows processed and all timings are reported.
rxCompressXdf uses ZLIB to compress
.xdf files in blocks. The auto compression level
of -1 is equivalent to approximately 6. Typically setting the
xdfCompressionLevel to 1
will provide an adequate amount of compression at the fastest speed.
A vector of RxXdfData data sources
Microsoft Technical Support
# Get location of sample uncompressed .xdf file sampleXdf <- file.path(rxGetOption("sampleDataDir"), "AirlineDemoSmallUC.xdf") # Create name for a temporary file compressXdf <- tempfile(pattern = ".rxCompress", fileext = ".xdf") # Create a new compressed .xdf file from the sample file newDS <- rxCompressXdf(inFile = sampleXdf, outFile = compressXdf, xdfCompressionLevel = 1) # Get information about files and compare sizes sampleFileInfo <- file.info(sampleXdf) compressFileInfo <- file.info(compressXdf) sampleFileInfo$size compressFileInfo$size # Clean-up file.remove(compressXdf)