Description Usage Arguments Details Examples
View source: R/move_to_existing_col.R
Use regex to identify values move between columns, leaving behind NA
1 | move_to_existing_col(df, my.replacement.col, my.replacer.col, my.regex)
|
my.replacement.col |
Column to which value will be moved |
my.replacer.col |
Name of column that contain values, leaving behind NA |
my.regex |
Regular expression |
df |
dataframe |
Wrapper for str_detect
1 2 3 |
z <- tibble(col1 = letters[1:5], col2 = c("boo","bah", "beh", "bi", "E") )
move_to_newcol(z, col1, col2, "[A-Z]")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.