dplyr (version 0.5.0)

mutate: Add new variables.


Mutate adds new variables and preserves existing; transmute drops existing variables.


mutate(.data, ...)

mutate_(.data, ..., .dots)

transmute(.data, ...)

transmute_(.data, ..., .dots)



A tbl. All main verbs are S3 generics and provide methods for tbl_df, tbl_dt and tbl_sql.


Name-value pairs of expressions. Use NULL to drop a variable.


Used to work around non-standard evaluation. See vignette("nse") for details.


An object of the same class as .data.

Data frame row names are silently dropped. To preserve, convert to an explicit variable.

See Also

Other single.table.verbs: arrange, filter, select, slice, summarise


Run this code
mutate(mtcars, displ_l = disp / 61.0237)
transmute(mtcars, displ_l = disp / 61.0237)

mutate(mtcars, cyl = NULL)

Run the code above in your browser using DataCamp Workspace