Skip to content

asardaes/table.express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e786429 · Apr 2, 2023
Mar 20, 2023
Mar 20, 2023
Nov 29, 2021
Aug 30, 2019
Mar 20, 2023
Apr 8, 2022
Aug 24, 2022
Aug 24, 2022
May 6, 2019
May 6, 2019
May 12, 2019
Apr 2, 2023
May 6, 2019
Mar 20, 2023
Apr 2, 2023
Nov 29, 2021
Nov 29, 2021
May 6, 2019
Apr 2, 2023
May 6, 2019

Repository files navigation

CRAN_Status_Badge R-CMD-check 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.