Learn R Programming

qs2 (version 0.1.5)

qs_read: qs_read

Description

Reads an object that was saved to disk in the qs2 format.

Usage

qs_read(file,
         validate_checksum = qopt("validate_checksum"),
         nthreads = qopt("nthreads"))

Value

The object stored in file.

Arguments

file

The file name/path.

validate_checksum

Whether to validate the stored checksum in the file (the initial value is FALSE).

nthreads

The number of threads to use when reading data (the initial value is 1L).

Examples

Run this code
x <- data.frame(int = sample(1e3, replace=TRUE),
         num = rnorm(1e3),
         char = sample(state.name, 1e3, replace=TRUE),
         stringsAsFactors = FALSE)
myfile <- tempfile()
qs_save(x, myfile)
x2 <- qs_read(myfile)
identical(x, x2) # returns TRUE

Run the code above in your browser using DataLab