From | Ron�n Conroy <rconroy@rcsi.ie> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: RE: Dealing with string variables |
Date | Wed, 10 Nov 2004 16:45:28 +0000 |
Nick Cox wrote:
drop if grain == "wheat"using -encode-
value labels for string variables: not allowed
what you want is better done by
gen Crop = "crop" if inlist(crop, "wheat", "barley") replace Crop = "root" if inlist(crop, "potato", "cassava", "yams", "beet") ...
© Copyright 1996–2025 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |