doj | R Documentation |
Perform a data.table calculation dt[,j,by] or dt[,j] within a pipe chain (%>%) .
jby(data, expr_j, expr_by)
doj(data, expr_j)
data |
A data.table object, say dt |
expr_j |
The |
expr_by |
The |
Allows dt[,j,by] or dt[,j] calculations within a pipe chain, such as
iris %>% as.data.table %>% doj(mean(Sepal.Length)) %>% print
require(data.table); require(dplyr);
iris %>%
as.data.table %>%
jby(mean(Sepal.Length),Species) %>%
print
require(data.table); require(dplyr);
iris %>%
as.data.table %>%
doj(mean(Sepal.Length)) %>%
print
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.