Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/krlmlr/fstplyr

A dplyr interface to fst
https://github.com/krlmlr/fstplyr

Last synced: about 2 months ago
JSON representation

A dplyr interface to fst

Awesome Lists containing this project

README

        

---
output:
github_document:
html_preview: false
---

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```

# fstplyr

[![Travis-CI Build Status](https://travis-ci.org/krlmlr/fstplyr.svg?branch=master)](https://travis-ci.org/krlmlr/fstplyr)
[![Coverage status](https://codecov.io/gh/krlmlr/fstplyr/branch/master/graph/badge.svg)](https://codecov.io/github/krlmlr/fstplyr?branch=master)
[![CRAN status](http://www.r-pkg.org/badges/version/fstplyr)](https://cran.r-project.org/package=fstplyr)

Provides a simple yet complete [dplyr](http://dplyr.tidyverse.org/) interface to [fst](http://www.fstpackage.org/) 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](http://tibble.tidyverse.org/).

## Example

```{r 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)
src <- src_fst(path)
src
tbl(src, "mtcars") %>%
select(mpg:wt, -drat, gear)
```

## Installation

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