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

st: re: leftist tendencies


From   Christopher Baum <[email protected]>
To   [email protected]
Subject   st: re: leftist tendencies
Date   Wed, 09 Feb 2005 13:33:15 -0500

Friedrich is correct: there is an extended-macro-function called format. Thus Nick's general-purpose program to make every string variable left-just (better then mine, in that it works on the whole dataset) can be written as

ds, has(type string)

foreach v in `r(varlist)' {
    local f : format `v'
    local ff : subinstr local f "%" "%-%"
    format `v' `ff'
}

No shorter, but more to the point.

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