Skip to contents

Separates a column at a provided pattern, separates the second second into individual letters and joins segments with a provided joining pattern

Usage

.separateSubunits(df, ab, new_col, pattern, join_pattern, t1, t2)

Arguments

df

A data.frame or tibble

ab

The name of the column containing names to split

new_col

The name of the new column containing split names

pattern

The regex pattern to use for splitting

join_pattern

sprintf pattern for joining t1 (start) and t2 (end)

t1

first temporary column name

t2

second temporary column name