Skip to content
Use dplyr verbs to build data.table expressions
R
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R
inst
man-roxygen
man
tests
vignettes
.Rbuildignore
.covrignore
.gitattributes
.gitignore
.travis.yml
DESCRIPTION
LICENSE
NAMESPACE
NEWS.md
README.Rmd
README.md
appveyor.yml
codecov.R
cran-comments.md
table.express.Rproj

README.md

CRAN_Status_Badge Travis-CI Build Status AppVeyor Build status codecov

Table express

Use dplyr verbs, as well as custom ones, to build data.table expressions. Check the vignette for more information.

Essence

The basic idea is to parse the input from all the verbs and create a single expression that, after evaluation, simply delegates all the actual computations to data.table, letting it handle all optimizations as usual.

# the expression is what matters here, input is left empty
data.table() %>%
    start_expr %>%
    select(col) %>%
    where(var == val) %>%
    order_by(v)
#> .DT_[var == val, list(col)][order(v)]

The input data.table is always assigned in the evaluation’s environment as the .DT_ pronoun

In many cases character input can also be supported, which could be useful for other packages that use data.table.

License

Mozilla Public License Version 2.0

This software package was developed independently of any organization or institution that is or has been associated with the author.

You can’t perform that action at this time.