Mutate columns in data.frame
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
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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.