rsplit: Split a starting from the right

Description Usage Arguments Value Examples

View source: R/functions.R

Description

This is an R equivalent to the python str.rsplit method which will return a vector of length n+1 of a string split by a given character starting from the right hand side of the string

Usage

1
rsplit(string, split_by, n = 1)

Arguments

string

The string to split

split_by

The character to split string by

n

The number of split you want to perform

Value

The string split from the right

Examples

1
2
rsplit(string = 'my_string_abc', split_by = '_', n = 1)
rsplit(string = 'my_string_abc', split_by = '_', n = 2)

TJGorrie/localXCR documentation built on Dec. 18, 2021, 4:01 p.m.