rds_to_qs: RDS to qs2 format

View source: R/qs_rds_conversion.R

rds_to_qsR Documentation

RDS to qs2 format

Description

Converts a file saved in the RDS format to the qs2 format.

Usage

rds_to_qs(input_file, output_file, compress_level = 3)

Arguments

input_file

The RDS file to convert.

output_file

The qs2 file to write.

compress_level

The zstd compression level to use when writing the qs2 file. See the qs_save help file for more details on this parameter.

Details

The shuffle parameters is currently not supported when converting from RDS to qs2. When reading the resulting qs2 file, validate_checksum must be set to FALSE.

Value

No value is returned. The converted file is written to disk.

Examples

qs_tmp <- tempfile(fileext = ".qs2")
rds_tmp <- tempfile(fileext = ".RDS")

x <- runif(1e6)
saveRDS(x, rds_tmp)
rds_to_qs(input_file = rds_tmp, output_file = qs_tmp)
x2 <- qs_read(qs_tmp, validate_checksum = FALSE)
stopifnot(identical(x, x2))

qs2 documentation built on Sept. 30, 2024, 9:44 a.m.