mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-09-12 18:09:39 +02:00
25 lines
630 B
Text
25 lines
630 B
Text
|
% Generated by roxygen2: do not edit by hand
|
||
|
% Please edit documentation in R/wide2long.R
|
||
|
\name{grepl_fix}
|
||
|
\alias{grepl_fix}
|
||
|
\title{Matches pattern to vector based on match type}
|
||
|
\usage{
|
||
|
grepl_fix(data, pattern, type = c("prefix", "infix", "suffix"))
|
||
|
}
|
||
|
\arguments{
|
||
|
\item{data}{vector}
|
||
|
|
||
|
\item{pattern}{pattern(s) to match. Character vector of length 1 or more.}
|
||
|
|
||
|
\item{type}{type of match. can be one of "prefix","infix" or "suffix".}
|
||
|
}
|
||
|
\value{
|
||
|
logical vector
|
||
|
}
|
||
|
\description{
|
||
|
Matches pattern to vector based on match type
|
||
|
}
|
||
|
\examples{
|
||
|
c("id", "age", "weight_0", "weight_1") |> grepl_fix(pattern = c("_0", "_1"), type = "suffix")
|
||
|
}
|