Description Usage Arguments Value Examples
Create a fsttable object that can be accessed like a regular data frame. This object is just a reference to the actual data and requires only a small amount of memory. When data is accessed, only the requested subset is read from file. This is possible because the fst file format allows full random access (in columns and rows) to the stored dataset.
1 |
path |
Path to a fst file |
old_format |
Use |
An object of class fsttable
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ## Not run:
# generate a sample fst file
path <- paste0(tempfile(), ".fst")
write_fst(iris, path)
# create a fsttable object that can be used as a data frame
ft <- fst(path)
# print head and tail
print(ft)
# select columns and rows
x <- ft[10:14, c("Petal.Width", "Species")]
# use the common list interface
ft[TRUE]
ft[c(TRUE, FALSE)]
ft[["Sepal.Length"]]
ft$Petal.Length
# use data frame generics
nrow(ft)
ncol(ft)
dim(ft)
dimnames(ft)
colnames(ft)
rownames(ft)
names(ft)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.