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

st: Dealing with string variables

From   TEWODAJ MOGUES <[email protected]>
To   Stata _ <[email protected]>
Subject   st: Dealing with string variables
Date   Wed, 10 Nov 2004 10:31:43 -0500

Dear Statalisters,

For the longest time I have been trying to find ways around certain 
commands that would involve string variables, but I can't believe that 
these commands really don't exist. Hence my question: For example, 
if "grain" is a string variable, how do I do an operation such as "drop 
if grain==wheat"? Similarly, how do I create value labels for string 
variables. For example, if I want the variable "grain" to have the 
value label "crop" when it takes on the value "wheat" and "barley"? I 
would be delighted if I didn't have to find laborious ways of data 
manipulation where dealing directly with the string variables would be 
much easier.


Tewodaj Mogues
Dept. of Agricultural and Applied Economics
University of Wisconsin - Madison
427 Lorch St. #317, Taylor Hall
Madison, WI 53706
*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index