Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: simple method to identify string variables?


From   David Radwin <[email protected]>
To   [email protected]
Subject   st: simple method to identify string variables?
Date   Fri, 7 Sep 2007 11:38:26 -0700

Dear Statalisters,

Is there a simple way to identify string variables using an if statement? As an obviously contrived example, suppose I wanted to use the -mean- command for all numeric variables. I would get this error message:

. sysuse auto,clear
. mean _all
varlist: make: string variable not allowed
r(109);

Can I limit the command to numeric variables only? I suspect there is an easy, even obvious solution, but I can't find it anywhere.

Thanks,

David
--
David Radwin, Principal Analyst // [email protected]
Office of Student Research, University of California, Berkeley
*
* 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