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 on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: Unique identifier from a string name


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Unique identifier from a string name
Date   Thu, 24 Nov 2011 11:40:48 +0000

-egen-'s -group()- works fine for most such purposes. Note its -label- option.

Nick

On Thu, Nov 24, 2011 at 11:25 AM, Barry Quinn <b.quinn@qub.ac.uk> wrote:

> I would like to create a uniquely identified numerical code from a string variable by ideally converting each letter of the string into a number (but any other solutions that could create a unique identifier from a string are welcomed).
> Is there some way of reversing the function char() to do this ?
*
*   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/


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