Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Text to column in Stata


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   Re: st: Text to column in Stata
Date   Tue, 24 Mar 2009 22:42:00 +0100

<>

Tomas,

that is a very good reference, but your task is much easier than most of the stuff in there :-) Still, worth checking out, no doubt :-)

HTH
Martin
_______________________
----- Original Message ----- From: "Tomas M" <[email protected]>
To: <[email protected]>
Sent: Tuesday, March 24, 2009 10:37 PM
Subject: RE: st: Text to column in Stata


Sorry for everyone's time,

I found my answer!

If anyone is interested:
http://www.ats.ucla.edu/stat/Stata/faq/regex.htm

Thanks for all the help

----------------------------------------
From: [email protected]
To: [email protected]
Subject: RE: st: Text to column in Stata
Date: Tue, 24 Mar 2009 14:33:50 -0700

As a follow up,

I know of a command in Stata that only takes the year of a date,

e.g. generate newvar = year(date of birth), which will generate a new variable containing only the year of birth.

Something similar to this would be great!



----------------------------------------
From: [email protected]
To: [email protected]
Subject: st: Text to column in Stata
Date: Tue, 24 Mar 2009 14:29:23 -0700

Hello all,

I have a string variable, say "A###" (i.e. A112, A222, A344, etc.).

How would I code in Stata to generate a new variable that includes only the "A"?

In summary, I have a variable, "A###", and I want to generate a new variable, "A".

Similarly, I have a variable, "B###", and I want to generate a new variable, "B".


Any ideas on how I can do this in Stata?

In Excel, I would just use text to columns, and break it down into two separate columns. Anything like this in Stata?

Thank you!


_________________________________________________________________
Share photos with friends on Windows Live Messenger
http://go.microsoft.com/?linkid=9650734
*
* 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/

_________________________________________________________________
Experience all of the new features, and Reconnect with your life.
http://go.microsoft.com/?linkid=9650730
*
* 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/

_________________________________________________________________
Reunite with the people closest to you, chat face to face with Messenger.
http://go.microsoft.com/?linkid=9650736
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index