qst (version 0.1.2)

read_qst: Read a data.frame from an SQLite database

Description

This function reads a data.frame from an SQLite database. The database has one table, named data, containing the data. Additional tables, prefixed with meta_, may be added in the future to support additional data types not supported in a native way by SQLite.

By specifying lazy=TRUE, the data.frame will not be read into memory on the read operation, but instead a lazy evaluated data.frame will be returned. This results in a near-instantaneous read operation, but subsequent operation will then be done from disk using SQL translation when the data.frame is passed to other functions or collect() is called on it.

Usage

read_qst(path, lazy = FALSE)

Arguments

path

The path to read from.

lazy

If TRUE, the full data.frame will not be read into memory, but instead a lazy evaluated data.frame will be returned.

Value

A data.frame read from the SQLite file found at path

Examples

Run this code
# NOT RUN {
# Write the cars data set to a file, then read it back
cars_db <- tempfile()
write_qst(cars, cars_db, indexes=list("speed"))
dat <- read_qst(cars_db)
unlink(cars_db)

# }

Run the code above in your browser using DataLab