Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: Problem with -recode- and temporary variables
From
Nick Cox <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
st: RE: Problem with -recode- and temporary variables
Date
Thu, 11 Nov 2010 19:32:30 +0000
I can't reproduce this in Stata 11.1. -recode- is much banged upon, so I guess the problem is in how your Stata is set up.
. clear
. set obs 9
obs was 0, now 9
. gen region = _n
. recode region (1/4 9=0 "Blue")(4/8=1 "Red"), gen(redblue)
(9 differences between region and redblue)
Try
. update query
Nick
[email protected]
Alan Neustadtl
I am trying to recode a variable and getting an error that a temporary
variable is already defined. I have rebooted and restarted Stata but
still get the same error message.
If anyone can shed some light I would appreciate it. The code I am running is:
. recode region (1/4 9=0 "Blue")(4/8=1 "Red"), gen(redblue)
__000000 already defined
r(110);
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/