grabLast: Get the final set of characters after a single-character...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/grabLast.R

Description

Get the final set of characters from a vector after a single-character delimeter. This can be useful in filename manipulations, among other things.

Usage

1
grabLast(vec, split.char)

Arguments

vec

Character vector (usually containing filenames)

split.char

A single character used to split the character strings

Value

Character vector of the strings that appear after the last instance of split.char

Author(s)

Landon Sego

See Also

Additional functions for filename manipulations: stripExtension, getExtension, stripPath, getPath, basename, dirname

Examples

1
2
grabLast(c(a="email@nowhere.com", "this.has.no.at.sign", "@",
             "bad.email@weird.com@", NA, "2at's@email@good.net"), "@")

Smisc documentation built on May 2, 2019, 2:46 a.m.