findVars: findVars

Description Usage Arguments Value Examples

Description

findVars searching the variable names of a data.frame for matches to a provided character string, and then returns the matching variable name(s).

Usage

1
findVars(data, str, ignore.case = TRUE, fuzzy = TRUE)

Arguments

data

data.frame to search

str

character string to search for in variable names

ignore.case

TRUE/FALSE: Should character case be ignored when searching

fuzzy

If TRUE, a fuzzy search method will be used

Value

A vector of matching variable names.

Examples

1
2
#fakeData <- data.frame(sex = sample(c('male', 'female'), 10, replace=T), smokng = sample(c('yes', 'no'), 10, replace=T))
#findVars(data = fakeData, str = 'smoking')

TaylorAndrew/atExplore documentation built on May 9, 2019, 4:22 p.m.