A function between dplyr's transmute and mutate

transmutate(.data, ...)

Arguments

.data

Data frame to pass to the function

...

Variables to pass to the function

Source

https://stackoverflow.com/questions/51428156/dplyr-mutate-transmute-drop-only-the-columns-used-in-the-formula

Value

Data frame with mutated variables and all other unnamed variables, but none of the variables used in the mutations.

Examples

# NOT RUN {
transmutate( mtcars, X = ifelse( vs, drat, wt ), Y = mpg*cyl )
# }