Description Usage Arguments Value Examples
'lookfor' searches for string in variable names and labels, just like the 'lookfor' command in Stata.
1 |
df |
The input 'df' should be a data frame. 'lookfor' works best with labelled data frames (from the 'haven' package). |
kw |
The keyword to search, 'kw', should be a string of length 1. |
'lookfor(df, kw)' returns a data frame that contains rows which match the keyword being searched.
1 2 | nlsw88 = haven::read_dta("http://www.stata-press.com/data/r13/nlsw88.dta")
lookfor(nlsw88, "mar") # search for variables that are related to marriage
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.