Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Figuring out if variables that were read in are strings or not
From
Maarten Buis <[email protected]>
To
[email protected]
Subject
Re: st: Figuring out if variables that were read in are strings or not
Date
Wed, 28 Dec 2011 14:12:31 +0100
On Tue, Dec 27, 2011 at 7:35 PM, Debs Majumdar wrote:
> Is there a way to find out if any of the variables are read in as string?
>
> I am using the --insheet-- command to read in a text file with around 20K variables which might contain "NA" in which case they would be read in as string.
You can get a list of all string variables in your dataset with -ds,
has(type string)-. If you want to check whether a specific variable
(say x) is a string you can use -confirm string variable x-.
Hope this helps,
Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/