lookfor: R version of the Stata lookfor function

Description Usage Arguments Examples

Description

This will try to find a variable when you can't remember its exact name. R version of the stata lookfor function

Usage

1
lookfor(string_to_find, data = dt)

Arguments

string_to_find

This is the string you wish to find passed. May be quoted or not.

data

data frame or table to search

Examples

1
2
3
# Create dt dataframe called dt then find vars with 'y' in the name
dt <- data.frame(id=c(1:10), x=letters[1:10], y1=rnorm(10), y2=round(runif(10)*100))
lookfor(y, data=dt)

datascibc/dsbc documentation built on May 14, 2019, 7:45 p.m.