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

st: RE: Keep string data


From   Soeren.MATTKE@oecd.org
To   statalist@hsphsun2.harvard.edu
Subject   st: RE: Keep string data
Date   Fri, 9 Aug 2002 13:05:12 +0200

keep if siteterm=="lung"

Soeren Mattke
OECD Health Policy Unit
2, rue Andre Pascal
75775 Paris Cedex 16

phone: + 33 1 4524 9236
fax:      + 33 1 4524 9098 


-----Original Message-----
From: christopher@fergusson030481.freeserve.co.uk
[mailto:christopher@fergusson030481.freeserve.co.uk]
Sent: Friday, August 09, 2002 1:00 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: Keep string data


Hi statalisters,

I have a dataset that contains information on the number of 
registrations within a certain year for different cancer sites. The 
variable name is siteterm and is stored at string10 type. When I am 
analysisng the data I need to keep and drop certain cancer sites 
however I am having trouble doing this. I have no problem dropping 
variables that are stored as int and byte types for example
keep if year==1996
but when I try to do the following
keep if siteterm==lung
I have the error "lung not found; r(111)" returned.
Any advice would be appreciated as this is the last stumbling 
block I am having in relation to my project.
Thanks in advance,

Christopher D Fergusson 



_______________________________________________________________________
Freeserve AnyTime, only 13.99 per month with one month's FREE trial!
For more information visit http://www.freeserve.com/time/ or call free on
0800 970 8890


*
*   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/
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index