Learn R Programming

qs2 (version 0.1.4)

qs_deserialize: qs_deserialize

Description

Deserializes a raw vector to an object using the qs2 format.

Usage

qs_deserialize(input, validate_checksum = FALSE, nthreads = 1L)

Value

The deserialized object.

Arguments

input

The raw vector to deserialize.

validate_checksum

Whether to validate the stored checksum in the file (default FALSE). This can be used to test for file corruption but has a performance penality.

nthreads

The number of threads to use when reading data (default: 1).

Examples

Run this code
x <- data.frame(int = sample(1e3, replace=TRUE),
        num = rnorm(1e3),
        char = sample(state.name, 1e3, replace=TRUE),
        stringsAsFactors = FALSE)
xserialized <- qs_serialize(x)
x2 <- qs_deserialize(xserialized)
identical(x, x2) # returns true

Run the code above in your browser using DataLab