findCols: Find a text among column names

View source: R/organizeBirds.R

findColsR Documentation

Find a text among column names

Description

Finds a text among column names and return it as it is

Usage

findCols(pattern, df, exact = FALSE, value = TRUE)

Arguments

pattern

character string containing a string or regular expression to be matched in the given character vector

df

A data.frame among whichs column names to look for the pattern

exact

A logical flag whether to return all matches or just that text. This is always case insensitive.

value

A logical flag (to be passed to grep()). If FALSE, a vector containing the (integer) indices of the matches determined by grep is returned, and if TRUE, a vector containing the matching elements themselves is returned.

Value

A vector with the column names that match the pattern


Greensway/BIRDS documentation built on Oct. 19, 2023, 2:35 a.m.