|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: keeping first digits in number
JJ, you have to convert the variable to a string format using tostring
(help tostring) and then extracting the first two digits with substr...
Please see help string_functions for substr details.
Juan.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Juan Julio
Gutierrez
Sent: Jueves, 21 de Mayo de 2009 04:57 p.m.
To: [email protected]
Subject: st: keeping first digits in number
Hello all
I am working with ISIC codes at the four digit level, but want to
perform descriptives at the two digit level.
Ideas on how to create a variable that delete the last 2 digits of the 4
digit categories but keeps the first two?
Thank you
JJ
*
* 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/