Provides a simple yet complete dplyr interface to fst files. Currently only select() and head() make use of fst’s superior performance, all other methods offload to the default data frame implementation. The data is always returned as a tibble.

Example

path <- tempfile()
dir.create(path)
fst::write_fst(iris, file.path(path, "iris.fst"))
fst::write_fst(mtcars, file.path(path, "mtcars"))

library(fstplyr)
#> 
#> Attaching package: 'fstplyr'
#> The following object is masked from 'package:stats':
#> 
#>     filter
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
src <- src_fst(path)
src
#> src:  fst files in /tmp/RtmpPrVRxh/file5f77d34b9d2
#> tbls: iris, mtcars
tbl(src, "mtcars") %>%
  select(mpg:wt, -drat, gear)
#> # A tibble: 32 x 6
#>      mpg   cyl  disp    hp    wt  gear
#>    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#>  1  21.0    6.  160.  110.  2.62    4.
#>  2  21.0    6.  160.  110.  2.88    4.
#>  3  22.8    4.  108.   93.  2.32    4.
#>  4  21.4    6.  258.  110.  3.22    3.
#>  5  18.7    8.  360.  175.  3.44    3.
#>  6  18.1    6.  225.  105.  3.46    3.
#>  7  14.3    8.  360.  245.  3.57    3.
#>  8  24.4    4.  147.   62.  3.19    4.
#>  9  22.8    4.  141.   95.  3.15    4.
#> 10  19.2    6.  168.  123.  3.44    4.
#> # ... with 22 more rows

Installation

# install.packages("remotes")
remotes::install_github("krlmlr/fstplyr")