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

st: Extracting names from string


From   "Paul O'Brien" <[email protected]>
To   [email protected]
Subject   st: Extracting names from string
Date   Mon, 16 Feb 2004 23:21:52 +0000

I want to create a new variable DOCTOR containing the names of the doctors from the variable 'STAFF'. The doctor's names appear in different order. Around 40,000 records.

I have tried
. gen str40 dr= staff
.split�staff, parse(DR )

... but there are some errors in the results

I'd appreciate help.

STAFF
DR RAMA SETIA
DR RAMA SETIA,HELEN BROSNAN NURSE
DR S.K. PATTANI
DR S.K. PATTANI,CELIA GAGE
DR S.K. PATTANI,DAPHNE BOULTER
DR S.K. PATTANI,GRACE BARANGO NURSE
DR SABINA HUSSAIN
DR SABINA HUSSAIN,GRACE HICKEN NURSE
DT GITA HALDER
DT GITA HALDER,DAPHNE BOULTER
DR JOGARAJAH
DR JOGARAJAH,CELIA GAGE
DR JOGARAJAH,GRACE HICKEN NURSE
DR JOGARAJAH,JENNY CHANDLER NURSE
EDWINA JAMES
EILEEN SHIWLOCHAN
GEORGINA SIMEI
GRACE BARANGO NURSE,CELIA GAGE
GRACE BARANGO NURSE,DR ASSANI
GRACE BARANGO NURSE,DR D ASARE-BROWN
GRACE BARANGO NURSE,DR FLORENCE KALIKWAN
GRACE BARANGO NURSE,DR P.K.PATTANI
GRACE BARANGO NURSE,DR S.K. PATTANI



Thanks

Dr Paul O'Brien
Westside Contraceptive Services
Raymede Clinic, Exmoor St, London
W10 6DZ
020 8962 4450 - tel
020 8962 4451 - fax
07900 495 118 - mob

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