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

st: re: leftist tendencies

From   Christopher Baum <>
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.

*   For searches and help try:

© Copyright 1996–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index