Learn R Programming

qs2 (version 0.1.5)

qs_to_rds: qs2 to RDS format

Description

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

Usage

qs_to_rds(input_file, output_file, compress_level = 6)

Value

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

Arguments

input_file

The qs2 file to convert.

output_file

The RDS file to write.

compress_level

The gzip compression level to use when writing the RDS file (a value between 0 and 9).

Examples

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

x <- runif(1e6)
qs_save(x, qs_tmp)
qs_to_rds(input_file = qs_tmp, output_file = rds_tmp)
x2 <- readRDS(rds_tmp)
stopifnot(identical(x, x2))

Run the code above in your browser using DataLab