# NOT RUN {
# generate a sample fst file
path <- paste0(tempfile(), ".fst")
write_fst(iris, path)
# create a fst_table 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)
# }
Run the code above in your browser using DataLab