dt_fst: Read fst and convert to data.table

View source: R/dt_fst.R

dt_fstR Documentation

Read fst and convert to data.table

Description

[Deprecated] Short hand to as.data.table(read_fst()). File extension can be omitted.

Usage

dt_fst(path_base, name = NULL, ext = ".fst")

Arguments

path_base

A character string, providing the path to read from.

name

A character string, the file name.

ext

A character string, optional, specifying the file extension.

Details

Output is a data.table. The function is deprecated, with the use of parquet tables. Tables can now be loaded IN-memory or OUT of memory with dt_parquet.

Value

A data.table, read from path_base/(name).

See Also

dt_parquet(), tb_vigibase(), tb_who(), tb_meddra()

Examples


# Say you have a data.frame stored in an fst format, such as this one
df <- data.frame(a = 1:10)

path <- paste0(tempdir(), "/dtfstex")
dir.create(path)

fst::write_fst(x = df,
              path = paste0(path, "/", "df.fst")
              )
# Now you have a new session without df.
rm(df)

# You may import the file directly to data.table format with dt_fst
df <- dt_fst(path, "df")

# Clean up (required for CRAN checks)
unlink(path, recursive = TRUE)

vigicaen documentation built on April 3, 2025, 8:55 p.m.