powered by
Mutate adds new variables and preserves existing; transmute drops existing variables.
mutate(.data, ...)mutate_(.data, ..., .dots)transmute(.data, ...)transmute_(.data, ..., .dots)
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.
tbl_df
tbl_dt
tbl_sql
Name-value pairs of expressions. Use NULL to drop a variable.
NULL
Used to work around non-standard evaluation. See vignette("nse") for details.
vignette("nse")
An object of the same class as .data.
.data
Data frame row names are silently dropped. To preserve, convert to an explicit variable.
Other single.table.verbs: arrange, filter, select, slice, summarise
arrange
filter
select
slice
summarise
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 DataLab