FreesearchR/man/grepl_fix.Rd
Andreas Gammelgaard Damsbo 912fff7474
Some checks are pending
pkgdown.yaml / pkgdown (push) Waiting to run
updated data import
2025-03-11 13:42:57 +01:00

24 lines
630 B
R

% 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")
}