group_or: Group Wrap and 'or' Concatenate Elements

Description Usage Arguments Examples

View source: R/group_or.R

Description

A wrapper for group and pastex that wraps each sub-expression element with grouping parenthesis and then concatenate/joins grouped strings with a regex 'or' ("|"). Equivalent to pastex(group(...), sep = "|").

Usage

1
group_or(..., group.all = TRUE)

Arguments

group.all

logical. If TRUE the resulting 'or' concatenated elements will be wrapped with grouping parenthesis.

...

Regular expressions to paste together or a named expression from the default regular expression dictionary prefixed with single at (@) (e.g., "@rm_hash") or a regular expression from regex_supplement dictionary prefixed with an at (@) (e.g., "@time_12_hours").

Examples

1
2
3
group_or("@rm_hash", "@rm_tag")
group_or("them", "those", "that", "these")
group_or("them", "those", "that", "these", group.all = FALSE)


qdapRegex documentation built on May 19, 2017, 1:42 p.m.
Search within the qdapRegex package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.