provides hybrid data structure for 'fst' file
Methods
Method close()
close the connection
Examples
if(!is_on_cran()){
# Data to save, total 8 MB
x <- matrix(rnorm(1000000), ncol = 100)
# Save to local disk
f <- tempfile()
fst::write_fst(as.data.frame(x), path = f)
# Load via LazyFST
dat <- LazyFST$new(file_path = f, dims = c(10000, 100))
# dat < 1 MB
# Check whether the data is identical
range(dat[] - x)
# The reading of column is very fast
system.time(dat[,100])
# Reading rows might be slow
system.time(dat[1,])
}
#> NOT_CRAN is TRUE/true (not on CRAN)
#> user system elapsed
#> 0.003 0.003 0.006