qs_read: qs_read

View source: R/RcppExports.R

qs_readR Documentation

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"))

Arguments

file

The file name/path.

validate_checksum

If TRUE, validate checksum before deserialization and error on mismatch (or missing checksum). If FALSE, checksum is computed during read and mismatches (or missing checksum) produce a warning after reading (the initial value is FALSE).

nthreads

The number of threads to use when reading data (the initial value is 1L). When TBB is not available, values greater than 1 emit a warning and fall back to 1.

Value

The object stored in file.

Examples

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

qs2 documentation built on April 22, 2026, 9:07 a.m.

Related to qs_read in qs2...