View source: R/transforms_fill.R
transform.tbl_df | R Documentation |
Add new variables to a data_frame
## S3 method for class 'tbl_df'
transform(.data, ...)
.data |
The data_frame object to apply the transformation to |
... |
Name-value pairs of expressions. Use NULL to drop a variable. |
This function provides a wrapper around dplyr::mutate
. It implements the base::transform
generic for data_frame objects.
A copy of .data with the transformed columns
library(dplyr)
CO2 %>% as_data_frame %>% transform(newType=Type)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.