mutate_dt | R Documentation |
Adds or updates columns in data.frame.
mutate_dt(.data, ..., by)
transmute_dt(.data, ..., by)
.data |
data.frame |
... |
List of variables or name-value pairs of summary/modifications functions. |
by |
(Optional) Mutate by what group? |
data.table
mutate
iris %>% mutate_dt(one = 1,Sepal.Length = Sepal.Length + 1)
iris %>% transmute_dt(one = 1,Sepal.Length = Sepal.Length + 1)
# add group number with symbol `.GRP`
iris %>% mutate_dt(id = 1:.N,grp = .GRP,by = Species)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.