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: comparing strings


From   Abhimanyu Arora <abhimanyu.arora1987@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: comparing strings
Date   Tue, 6 Jul 2010 21:44:26 +0200

Hi
You can use egen newvar=diff(name name1)
Abhimanyu

On Tue, Jul 6, 2010 at 5:55 PM,  <mt2235@columbia.edu> wrote:
> Hi,
>
> I have two variables name and name1 that contain strings. How can I compare
> whether the strings are the same or not?
> For example in the same row  name can be "John Smith" and name1 can be "Ray
> Adams" so they are not the same. Or there can be another row that both name
> and name1 are "Jane Gore" so they are the same.
>
>
> Thank you
> Margie
> *
> *   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/
>

*
*   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