This is the function read_fst but with automatic conversion to data.table. It also allows to read hdd data.

readfst(path, columns = NULL, from = 1, to = NULL, confirm = FALSE)

Arguments

path

Path to fst file -- or path to hdd data. For hdd files, there is a

columns

Column names to read. The default is to read all columns. Ignored for hdd files.

from

Read data starting from this row number. Ignored for hdd files.

to

Read data up until this row number. The default is to read to the last row of the stored data set. Ignored for hdd files.

confirm

If the HDD file is larger than ten times the variable getHdd_extract.cap(), then by default an error is raised. To anyway read the data, use confirm = TRUE. You can set the data cap with the function setHdd_extract.cap.

Value

This function returns a data table located in memory. It allows to read in memory the hdd data saved on disk.

Details

This function reads one or several .fst files and place them in a single data table.

See also

See hdd, sub-.hdd and cash-.hdd for the extraction and manipulation of out of memory data. For importation of HDD data sets from text files: see txt2hdd.

See hdd_slice to apply functions to chunks of data (and create HDD objects) and hdd_merge to merge large files.

To create/reshape HDD objects from memory or from other HDD objects, see write_hdd.

To display general information from HDD objects: origin, summary.hdd, print.hdd, dim.hdd and names.hdd.

Author

Laurent Berge

Examples


# Toy example with the iris data set

# writing a hdd file
hdd_path = tempfile()
write_hdd(iris, hdd_path, rowsPerChunk = 30)

# reading the full data in memory
base_mem = readfst(hdd_path)

# is equivalent to:
base_hdd = hdd(hdd_path)
base_mem_bis = base_hdd[]