Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Automatically add prefaces to merged variables


From   Stephen Cranney <scranney@sas.upenn.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Automatically add prefaces to merged variables
Date   Mon, 12 Nov 2012 08:07:03 -0500

The mmerge command worked perfectly for my purposes. Thanks!

On Sat, Nov 10, 2012 at 5:31 PM, Phil Clayton
<philclayton@internode.on.net> wrote:
> You could try Jeroen Weesie's -mmerge- from SSC. The uname() option does what you want; from the -mmerge- help file:
>
> uname(stub) specifies a stub prefixed to the names of the variables imported from the using data, truncated at 32 characters.
>
> Phil
>
> On 11/11/2012, at 2:31 AM, Stephen Cranney <scranney@sas.upenn.edu> wrote:
>
>> Hi all,
>>
>>
>> I'm merging about thirty different datasets together to form one big
>> longitudinal one, and many of them have the same variables but
>> different values that change over time (household income, for
>> example). I could go through and rename all the relevant variables by
>> hand, but is there a quick and easy way to automatically preface every
>> variable from dataset X with a certain letter or number during the
>> process of or after merging?
>>
>> Thanks in advance,
>>
>> Stephen
>> *
>> *   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/
*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index