John Mount points out that there is a built-in function to mutate data frames in R:
The notation we used above is the “explicit argument” variation we recommend for readability. What a lot of
dplyrusers do not seem to know is: base-Ralready has this functionality. The function is calledtransform().To demonstrate this, let’s first detach
dplyrto show that we are not using functions fromdplyr.detach("package:dplyr", unload = TRUE)Now let’s write the equivalent pipeline using exclusively base-
R.
Click through for the way to do this as a pipeline operation.