grapes-s-grapes: regular expression substitution

%s%R Documentation

regular expression substitution

Description

This simplifies the syntax of regular expression matching.

Usage

text %s% pat

Arguments

text

text to match against pattern

pat

regular expression, and replacement

Value

a vector of the sam elength as text, with substituted items

Examples

> text <- c('a','b','c')
> text %s% c('[ab]','_')
[1] "_" "_" "c"

a-kramer/SBtabVFGEN documentation built on Nov. 14, 2024, 8:41 p.m.