Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: cut variables


From   Patricia Vera Rojas <[email protected]>
To   [email protected]
Subject   RE: st: RE: cut variables
Date   Thu, 10 Nov 2005 16:36:01 +0100 (CET)

Thanks a lot Cameron,

Patricia


 --- "Munro, Cameron" <[email protected]> escribi�:

> See -help strfun- and specifically -substr-. In your case
> you'd use substr(varname,1,2) assuming the digits are
> always the first two characters.
> 
> Cameron.
> 
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of
> Patricia Vera
> Rojas
> Sent: 10 November 2005 15:24
> To: [email protected]
> Subject: st: cut variables
> 
> 
> Hi,
> 
> I have a string variable with different size:
> 
> 01 XXX YYY ZZZ 
> 02 XXXX YYY ZZZZZZ
> .
> .
> .
> .
> .
> 30 X Z YYYYY
> 
> I want to get only the first two digits (01 to 30) 
> How can I do it?
> 
> Thanks,
> Patricia
> 
> 
> 		
> ______________________________________________ 
> Renovamos el Correo Yahoo! 
> Nuevos servicios, m�s seguridad 
> http://correo.yahoo.es
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 
> 
> --------------------
> 
> This email message is for the sole use of the intended
> recipient(s) and
> may contain privileged information. Any unauthorized
> review, use,
> disclosure or distribution is prohibited. If you are not
> the intended
> recipient, please contact the sender by reply email and
> destroy all copies
> of the original message.
> 
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 



		
______________________________________________ 
Renovamos el Correo Yahoo! 
Nuevos servicios, m�s seguridad 
http://correo.yahoo.es
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index