dt: Pipeable data.table call

Description Usage Arguments Examples

View source: R/dt.R

Description

Pipeable data.table call

Note: This function does not use data.table's modify-by-reference

Usage

1
dt(.df, ...)

Arguments

.df

A data.frame or data.table

...

Arguments passed to data.table call. See ?data.table::[.data.table

Examples

1
2
3
4
5
6
7
8
9
test_df <- data.table(
  x = 1:3,
  y = 4:5,
  z = c("a", "a", "b")
)

test_df %>%
  dt(, double_x := x * 2) %>%
  dt(order(-double_x))

mtfairbanks/gdt documentation built on May 4, 2021, 9:44 a.m.