Code Monkey home page Code Monkey logo

fstplyr's Introduction

fstplyr

Travis-CI Build Status Coverage status CRAN status

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/RtmpaVVOLY/file321750ba4185
#> 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.00   160 110    2.62  4.00
#>  2  21.0  6.00   160 110    2.88  4.00
#>  3  22.8  4.00   108  93.0  2.32  4.00
#>  4  21.4  6.00   258 110    3.22  3.00
#>  5  18.7  8.00   360 175    3.44  3.00
#>  6  18.1  6.00   225 105    3.46  3.00
#>  7  14.3  8.00   360 245    3.57  3.00
#>  8  24.4  4.00   147  62.0  3.19  4.00
#>  9  22.8  4.00   141  95.0  3.15  4.00
#> 10  19.2  6.00   168 123    3.44  4.00
#> # ... with 22 more rows

Installation

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.