REDCapCAST/man/strsplitx.Rd

31 lines
771 B
Plaintext
Raw Permalink Normal View History

2023-07-04 16:03:06 +02:00
% 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")
2024-02-06 14:15:36 +01:00
strsplitx(test, "[0-9]", type = "around")
2023-07-04 16:03:06 +02:00
}