Closed moodymudskipper closed 4 years ago
In dplyr :
mutate()
transmute()
morph()
In data.table
:=
foo <- "bar"; dt[, (foo) := expr]
bar
dt[, list(var1, var2) := something]
.()
by
In tb :
.j
...
In dplyr :
mutate()
creates or modifies columns and keep existing colstransmute()
creates or modifies columns and remove othersmorph()
(will) create or modify columns, and remove columns used in the callIn data.table
:=
mutates in place, allowing a flexible lhs :foo <- "bar"; dt[, (foo) := expr]
to create abar
columndt[, list(var1, var2) := something]
.()
transmutes, not in place (or summarizes, depending ifby
argument.In tb :
.j
...