strsplit2 {JATSdecoder} | R Documentation |
strsplit2
Description
Extension of strsplit(). Makes it possible to split lines before or after a pattern match without removing the pattern.
Usage
strsplit2(x, split, type = "remove", perl = FALSE)
Arguments
x |
text string to process. |
split |
pattern to split text at. |
type |
one out of c("remove", "before", "after"). |
perl |
Logical. If TRUE uses perl expressions. |
Value
A list of the same length as x, the i-th element of which contains the vector of splits of x[i].
Examples
x<-"This is some text, where text is the split pattern of the text."
strsplit2(x,"text","after")
[Package JATSdecoder version 1.2.0 Index]