This works perfectly.
Thank you!
On Fri, Nov 23, 2012 at 1:28 PM, Nick Cox <njcoxstata@gmail.com> wrote:
> See also -ds- or -findname- (SJ/SSC) for ways of separating numeric and
> string variables.
>
> Nick
>
>
> On 23 Nov 2012, at 17:34, Ryan Kessler <ryan.kessler.stata@gmail.com> wrote:
>
>> sysuse auto, clear
>> foreach x of varlist * {
>> if substr("`: type `x''",1,3) != "str" {
>> recode `x' (23 = 88888)
>> }
>> }
>> // This is easier when we don't have any string variables in the dataset
>> drop make
>> recode * (24 = 99999)
>>
>> On Fri, Nov 23, 2012 at 12:19 PM, Stephen Cranney
>> <scranney@sas.upenn.edu> wrote:
>>>
>>> Hi all,
>>>
>>> Pardon the simple question, but I haven't been able to find an answer.
>>> Is there a quick and parsimonious way to refer to all the variables in
>>> a dataset for purposes of recoding?
>>>
>>>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/