Statalist


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

Re: st: excluding variables by type


From   "Vladimir Vakhitov" <vvakhitov@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: excluding variables by type
Date   Tue, 25 Mar 2008 12:28:46 -0400

Look for -help extended_fcn-
A command -local s: type varname - will create a local `s' with the
type of the variable.

Vladimir.


2008/3/25, Libby Hemphill <libbyh@umich.edu>:
> Hi,
>
>  I'm wondering if there's a way to loop through all my variables and
>  perform some action only on those that are numeric.  Is there a way to
>  check for the type of the variable before doing something?  Like
>
>  for each variable
>  if string, next
>  else do X
>  end for
>
>  Thanks!
>
>  --
>  Libby Hemphill
>  Doctoral Candidate
>  School of Information
>  University of Michigan
>  http://www.libbyh.com
>  *
>  *   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/
>


-- 
__________________
Volodymyr Vakhitov
vvakhitov@gmail.com
*
*   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