mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2024-11-24 14:01:55 +01:00
32 lines
771 B
R
32 lines
771 B
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/utils.r
|
|
\name{strsplitx}
|
|
\alias{strsplitx}
|
|
\title{Extended string splitting}
|
|
\usage{
|
|
strsplitx(x, split, type = "classic", perl = FALSE, ...)
|
|
}
|
|
\arguments{
|
|
\item{x}{data}
|
|
|
|
\item{split}{delimiter}
|
|
|
|
\item{type}{Split type. Can be c("classic", "before", "after", "around")}
|
|
|
|
\item{perl}{perl param from strsplit()}
|
|
|
|
\item{...}{additional parameters are passed to base strsplit handling splits}
|
|
}
|
|
\value{
|
|
list
|
|
}
|
|
\description{
|
|
Can be used as a substitute of the base function. Main claim to fame is
|
|
easing the split around the defined delimiter, see example.
|
|
}
|
|
\examples{
|
|
test <- c("12 months follow-up", "3 steps", "mRS 6 weeks",
|
|
"Counting to 231 now")
|
|
strsplitx(test, "[0-9]", type = "around")
|
|
}
|