juba/questionr — pull request #1 by briatte (2013-02-11 01:32:25+00:00)
Title: Suggesting a new function (and fixed two typos)

Dear Juba,

Here's a function that I would like to submit to your package. It searches through variable names and, when available, variable descriptions, as offered by the `foreign` and `memisc` packages when they are used to import SPSS or Stata files.

Rationale: large social survey datasets often count hundreds of variables with more or less esoteric names. It is common to get lost in them, since it is impossible to remember a full codebook, at least not at first use.

Stata has a very handy function, [`lookfor`](http://www.stata.com/help.cgi?lookfor), that allows to search variable names and descriptions. The World Bank staff has even written an [augmented version](http://ideas.repec.org/c/boc/bocode/s455801.html) that searches several datasets.

The `lookfor` function that I suggesting pulling into your package does exactly the same thing as the `lookfor` command in Stata. It could be upgraded to accept fuzzy search patterns, and/or to search across datasets (although both would require quite some work).

Attached is example output using data from the General Social Survey. The function contains a short description, and there is a full vignette at [this Gist](https://gist.github.com/briatte/4699960). I would gladly consider adapting the function to your own needs and purposes for your package.

Cheers,

François

![example lookfor output on GSS 2010 data loaded with the memisc package](https://f.cloud.github.com/assets/322533/144063/9c16f6c8-73ea-11e2-836b-764990e3584d.png)