str_split_extract_element: Function to extract a specific element from 'str_split'

View source: R/str_split_extract_element.R

str_split_extract_elementR Documentation

Function to extract a specific element from str_split

Description

Function to extract a specific element from str_split

Usage

str_split_extract_element(x, pattern, n = Inf, element = 1, as_character = T)

Arguments

x

Input string

pattern

Pattern to split string on

n

Number of pieces to return. Default (Inf) uses all possible split positions

element

Element of split string to return

as_character

Should the string be returned as a character?

Author(s)

Shona Wilde


shonawilde/shonarrr documentation built on Jan. 29, 2025, 1:27 a.m.