Description Usage Arguments Value
Function that somehow generates a new column called "new_col_name" from the old column, called "col_name". splitFunc is a function that accepts a vector, and returns a new vector. This function is intended to do things like split sample names from the default values that are multipart and full of "_"s.
1 | generate_col(d, col_name, new_col_name, splitFunc)
|
d |
Input data frame needing new_col_name from col_name |
col_name |
The name of the column to use in generating the new one. |
new_col_name |
What are we going to name the new column. |
splitFunc |
Takes a single vector, returns a single vector, and contains the column creation logic. |
A copy of the input dataframe d, with the new column appended
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.