-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathREADME.Rmd
57 lines (43 loc) · 1.78 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
output:
md_document:
variant: gfm
editor_options:
chunk_output_type: console
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, cache = FALSE, include = FALSE}
library(knitr)
library(data.table)
library(table.express)
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-",
cache = FALSE
)
```
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/table.express)](https://cran.r-project.org/package=table.express)
[![R-CMD-check](https://github.com/asardaes/table.express/workflows/R-CMD-check/badge.svg)](https://github.com/asardaes/table.express/actions)
[![codecov](https://codecov.io/gh/asardaes/table.express/branch/master/graph/badge.svg)](https://codecov.io/gh/asardaes/table.express)
# Table express
Use `dplyr` verbs, as well as custom ones, to build `data.table` expressions.
Check the [vignette](https://asardaes.github.io/table.express/articles/table.express.html) 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.
```{r essence}
# the expression is what matters here, input is left empty
data.table() %>%
start_expr %>%
select(col) %>%
where(var == val) %>%
order_by(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](LICENSE)
This software package was developed independently of any organization or institution that is or has been associated with the author.