Dear All,
I am getting a rather messy output out of the Stata's ds command.As a result of investigation the following minimal example demonstrates the issue:
This results in the following output:

The problem seems to be provoked by the presence of a variable in front of the long-named variable, which would otherwise be shortened under the default value of the variable width (twelve).
If the line with the ds command is replaced with:
then the output becomes:

I did some further investigations and the output becomes messier with more variables of short and long names, but couldn't figure out a clear pattern.
Perhaps adding a strtrim() to the varlist before displaying it would be a quick and easy fix for the issue (if it hasn't been fixed yet in more recent versions of Stata). Or if this behavior is desirable, then what is the explanation??
Thank you. Sergiy Radyakin
I am getting a rather messy output out of the Stata's ds command.As a result of investigation the following minimal example demonstrates the issue:
Code:
clear all set more off version 14.0 forval i=1/28 { tempfile tmp clear set obs 1 generate t__id=1 generate `="x"*`i''__id = 1 describe save `"`tmp'"' local tmplist `"`tmplist' "`tmp'""' } foreach f in `tmplist' { use `"`f'"', clear ds *__id, varwidth(32) }

The problem seems to be provoked by the presence of a variable in front of the long-named variable, which would otherwise be shortened under the default value of the variable width (twelve).
If the line with the ds command is replaced with:
Code:
ds *__id

I did some further investigations and the output becomes messier with more variables of short and long names, but couldn't figure out a clear pattern.
Perhaps adding a strtrim() to the varlist before displaying it would be a quick and easy fix for the issue (if it hasn't been fixed yet in more recent versions of Stata). Or if this behavior is desirable, then what is the explanation??
Thank you. Sergiy Radyakin
Comment