move_to_existing_col: Move to Existing Column

Description Usage Arguments Details Examples

View source: R/move_to_existing_col.R

Description

Use regex to identify values move between columns, leaving behind NA

Usage

1
move_to_existing_col(df, my.replacement.col, my.replacer.col, my.regex)

Arguments

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

Details

Wrapper for str_detect

Examples

1
2
3
 
z <- tibble(col1 = letters[1:5], col2 = c("boo","bah", "beh", "bi", "E") )
move_to_newcol(z, col1, col2, "[A-Z]")

ctmann/nettles.toolbox documentation built on May 14, 2019, 12:29 p.m.