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

qd_read(file,
         use_alt_rep = qopt("use_alt_rep"),
         validate_checksum = qopt("validate_checksum"),
         nthreads = qopt("nthreads"))

Arguments

file

The file name/path.

use_alt_rep

Use ALTREP when reading in string data (default: qopt("use_alt_rep"), initial value is FALSE).

validate_checksum

Whether to validate the stored checksum in the file (default: qopt("validate_checksum"), initial value is FALSE).

nthreads

The number of threads to use when reading data (default: qopt("nthreads"), initial value is 1L).

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()
qd_save(x, myfile)
x2 <- qd_read(myfile)
identical(x, x2) # returns TRUE
#> [1] TRUE