Stata 11 help for lookfor

help lookfor -------------------------------------------------------------------------------

Title

[D] lookfor -- Search for string in variable names and labels

Syntax

lookfor string [string [...]]

Description

lookfor helps you find variables by searching for string among all variable names and labels. If multiple strings are specified, lookfor will search for each of them separately. You may search for a phrase by enclosing string in double quotes.

Examples

--------------------------------------------------------------------------- Setup . webuse nlswork

Find all occurrences of code in variable names and labels . lookfor code

Find all occurrences of married in variable names and labels . lookfor married

Find all occurrences of gnp in variable names and labels . lookfor gnp

Find all occurrences of code or married in variable names and labels . lookfor code married

--------------------------------------------------------------------------- Setup . sysuse sp500

Find all occurrences of price in variable names and labels . lookfor price

Find all occurrences of the phrase price change in variable names and labels . lookfor "price change" ---------------------------------------------------------------------------

Saved results

lookfor saves the following in r():

Macros r(varlist) the varlist of found variables

Also see

Manual: [D] lookfor

Help: [D] describe


© Copyright 1996–2010 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index