starts_with: Imported selection helpers from package 'tidyselect'

starts_withR Documentation

Imported selection helpers from package 'tidyselect'

Description

These selection helpers match variables according to a given pattern.

  • starts_with(): Starts with a prefix.

  • ends_with(): Ends with a suffix.

  • contains(): Contains a literal string.

  • matches(): Matches a regular expression.

  • num_range(): Matches a numerical range like x01, x02, x03.

Usage

starts_with(match, ignore.case = TRUE, vars = NULL)

ends_with(match, ignore.case = TRUE, vars = NULL)

contains(match, ignore.case = TRUE, vars = NULL)

matches(match, ignore.case = TRUE, perl = FALSE, vars = NULL)

all_of(x)

any_of(x, ..., vars = NULL)

Arguments

match

A character vector. If length > 1, the union of the matches is taken.

ignore.case

If TRUE, the default, ignores case when matching names.

vars

A character vector of variable names. If not supplied, the variables are taken from the current selection context (as established by functions like select() or pivot_longer()).

perl

Should Perl-compatible regexps be used?


theMILOlab/cypro documentation built on April 5, 2022, 2:03 a.m.