mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
Deploying to gh-pages from @ agdamsbo/FreesearchR@54dd332cd8 🚀
This commit is contained in:
parent
4cf4bd0499
commit
6d545337de
328 changed files with 12930 additions and 1662 deletions
34
reference/grepl_fix.md
Normal file
34
reference/grepl_fix.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# Matches pattern to vector based on match type
|
||||
|
||||
Matches pattern to vector based on match type
|
||||
|
||||
## Usage
|
||||
|
||||
``` r
|
||||
grepl_fix(data, pattern, type = c("prefix", "infix", "suffix"))
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- data:
|
||||
|
||||
vector
|
||||
|
||||
- pattern:
|
||||
|
||||
pattern(s) to match. Character vector of length 1 or more.
|
||||
|
||||
- type:
|
||||
|
||||
type of match. can be one of "prefix","infix" or "suffix".
|
||||
|
||||
## Value
|
||||
|
||||
logical vector
|
||||
|
||||
## Examples
|
||||
|
||||
``` r
|
||||
c("id", "age", "weight_0", "weight_1") |> grepl_fix(pattern = c("_0", "_1"), type = "suffix")
|
||||
#> [1] FALSE FALSE TRUE TRUE
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue