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

Re: st: Reading the letters in a name up to a particular character in Stata 8.2


From   "Neil Shephard" <[email protected]>
To   [email protected]
Subject   Re: st: Reading the letters in a name up to a particular character in Stata 8.2
Date   Mon, 13 Jun 2005 13:27:44 +0100

>  apologies if this has been posted  before and I missed it. I have a
>  string variable which is the name of companies (fictitious example
>  follows):
> 
> XYZ, International
> ABCDE, National
> DFTRER, Exports
> 
> etc
> 
> I want  to keep only the first part of the company name (e.g. keep XYZ
> ABCDE DFTRER, etc). The obvious solution is to ask Stata to read the
> letters and chop off anything from the character "," onwards, but am
> not very sure which command to use in Stata 8.2  to be able to do
> that. 
> 

An almost identical problem cropped up on the list last week initiated by Heather Gold.

The various response should provide you with a solution, see...

http://www.stata.com/statalist/archive/2005-06/msg00163.html

Regards

Neil

Neil Shephard
Genetics Statistician
ARC Epidemiology Unit, University of Manchester
[email protected]
[email protected]

"If your result needs a statistician then you should design a better experiment" - 
Ernest Rutherford

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