mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2026-06-19 13:17:30 +02:00
Deploying to gh-pages from @ agdamsbo/REDCapCAST@db75c3313e 🚀
This commit is contained in:
parent
bc2e23a272
commit
0b30252598
171 changed files with 7009 additions and 602 deletions
56
reference/strsplitx.md
Normal file
56
reference/strsplitx.md
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# Extended string splitting
|
||||
|
||||
Can be used as a substitute of the base function. Main claim to fame is
|
||||
easing the split around the defined delimiter, see example.
|
||||
|
||||
## Usage
|
||||
|
||||
``` r
|
||||
strsplitx(x, split, type = "classic", perl = FALSE, ...)
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- x:
|
||||
|
||||
data
|
||||
|
||||
- split:
|
||||
|
||||
delimiter
|
||||
|
||||
- type:
|
||||
|
||||
Split type. Can be c("classic", "before", "after", "around")
|
||||
|
||||
- perl:
|
||||
|
||||
perl param from strsplit()
|
||||
|
||||
- ...:
|
||||
|
||||
additional parameters are passed to base strsplit handling splits
|
||||
|
||||
## Value
|
||||
|
||||
list
|
||||
|
||||
## Examples
|
||||
|
||||
``` r
|
||||
test <- c("12 months follow-up", "3 steps", "mRS 6 weeks",
|
||||
"Counting to 231 now")
|
||||
strsplitx(test, "[0-9]", type = "around")
|
||||
#> [[1]]
|
||||
#> [1] "1" "2" " months follow-up"
|
||||
#>
|
||||
#> [[2]]
|
||||
#> [1] "3" " steps"
|
||||
#>
|
||||
#> [[3]]
|
||||
#> [1] "mRS " "6" " weeks"
|
||||
#>
|
||||
#> [[4]]
|
||||
#> [1] "Counting to " "2" "3" "1" " now"
|
||||
#>
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue