| df_trans | R Documentation |
Apply a reverse square-root or reverse log transformation to a numeric column and append the result as a new column.
df_trans(df, variable_name, transformation)
df |
A data frame. |
variable_name |
Name of the column to transform (string). |
transformation |
Transformation type: |
The input data frame with an additional column named
<variable_name>_sqrt or <variable_name>_log.
df <- data.frame(val = c(1, 4, 9, 16))
df_trans(df, "val", "sqrt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.