Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Enumerate dataset chars


From   Sergiy Radyakin <serjradyakin@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index