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]

st: String Variable


From   yj <jingjingteow@hotmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: String Variable
Date   Wed, 8 Jun 2011 07:08:01 -0700 (PDT)

Hello, I'm a new user of STATA. 

I would like to generate a new variable if a concatenated string variable
contains the character I want.

eg. 

observation            string variable
1                          ABC
2                          BC
3                          AC
4                          AFC
5                          A

I would like to create a new variable for observations where the string
variable contains the letter A (its position in the string variable is
irrelevant).

Please help, thank you!



--
View this message in context: http://statalist.1588530.n2.nabble.com/String-Variable-tp6453791p6453791.html
Sent from the Statalist mailing list archive at Nabble.com.
*
*   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