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: left right string


From   Tyler Frazier <tyfrazier@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: left right string
Date   Tue, 18 May 2010 23:03:19 +0200

simple question, I hope -- I have a variable which is a range of ages,
for example  the variable name is hhh_age and the quantities are
15-19, 20-24, 25-39 etc...

and I want to generate a new variable (age_min) that returns the left
two characters from hhh_age , and another variable that generates the
right two -- (age_max)

I searched but couldnt find it, seems like a very simple thing, but
cant figure it out.

any help is greatly appreciated

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