Learn R Programming

podcleaner (version 0.1.2)

utils_split_and_name: Split string into tibble

Description

Split provided string according to specified pattern. Organise output as a tibble.

Usage

utils_split_and_name(string, pattern, num_col, colnames)

Arguments

string

Character string to be split.

pattern

Pattern to split on as character string (can be a regex).

num_col

Number of parts to split the string into as integer.

colnames

Column names for the output tibble.

Value

A tibble

Examples

Run this code
# NOT RUN {
  utils_split_and_name("glasgow-entrepreneurs", "-", 2, c("location", "occupation"))
# }

Run the code above in your browser using DataLab