Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mutate

Mutate columns in data.frame


Description

Adds or updates columns in data.frame.

Usage

mutate_dt(.data, ..., by)

transmute_dt(.data, ..., by)

Arguments

.data

data.frame

...

List of variables or name-value pairs of summary/modifications functions.

by

(Optional) Mutate by what group?

Value

data.table

See Also

Examples

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)

tidyfst

Tidy Verbs for Fast Data Manipulation

v0.9.9
MIT + file LICENSE
Authors
Tian-Yuan Huang [aut, cre] (<https://orcid.org/0000-0002-3591-4203>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.