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

st: Storage datatype in assert test


From   "Wallace, John" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: Storage datatype in assert test
Date   Fri, 10 Sep 2004 13:40:02 -0700

Hi statalisters
I'm trying to build some error checking into an insheet process.  I'm
expecting a variable to be stored as an integer, but occasionally it comes
in as a string.  I'd like to trap that occurrence somehow, and -assert-
seems to be the logical route.  The problem is that I can't figure out how
to assert that a variable is a particular storage type (or, conversely, not
a string).  I've had a look through the manuals and it seems that the
Characteristics for the variable might figure into it.  There doesn't seem
to be much in the way of examples though.  Could someone help me out?
I figure the command I'm looking for would be something like

(a variable named Test is of the integer data storage type)

. assert `Test[DataType]' = "Int"

.


John Wallace�|�Research Associate�| Test Method Development
AFFYMETRIX, INC. | 3380 Central Expressway | Santa Clara, CA 95051 | Tel:�
408-731-5574 | Fax:� 408-481-0435


*
*   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