Bookmark and Share

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]

st: Enumerate dataset chars


From   Sergiy Radyakin <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Enumerate dataset chars
Date   Wed, 29 May 2013 13:07:35 -0400

Dear All,

I need to cleanup all the chars left by Stata's -reshape- command.

Both 'char list' and 'char dir' can show me what chars are defined,
but I can't get the full list from the program (they do not save
anything in the r- or s-results).

There is no 'char drop _all' , 'char drop *', 'char clear' or anything
similar. The only way appears to be to drop all the data, but this is
not what I can afford. Also reshape itself does not seem to have
anything like 'reshape cleanup'.

So looking into the following snippet, what do I write instead of X to
save the dataset with char mytest1 only?

sysuse auto, clear
char _dta[mytest1] first
char _dta[mytest2] second
** ...X.......
save mydta

Do not suggest 'char _dta[mytest2]' unless there is also a full list
of what mytest2 is after any reshape command.

Thank you, Sergiy

PS: in all of the above char is 'characteristic', not 'character'
function char()
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index