findCols: Find a text among column names

Description Usage Arguments Value

View source: R/organizeBirds.R

Description

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

Usage

1
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


BIRDS documentation built on June 27, 2021, 1:06 a.m.