I'd like to know if the new -table-/-collect- system is capable of allowing different numeric formats in the same column? Let's consider the simplest possible example, I want on result with a %6.2f format and one with a %6.1f format. This is a reasonable request, especially for descriptive tables, where variables are measured with more or less precision than each other.
Here is a minimal attempt, and failure, to produce such a table. I've tried other attempts, but also without success.
Result:
Code;
Here is a minimal attempt, and failure, to produce such a table. I've tried other attempts, but also without success.
Result:
Code:
--------------------- Mean --------------------- Price 6165.26 Mileage (mpg) 21.30 ---------------------
Code:
clear * cls sysuse auto, clear collect clear dtable price, cont(price) nformat(%6.2f mean) name(D1) collect layout (var) (result[mean]) dtable mpg, cont(mpg) nformat(%6.1f mean) name(D2) collect layout (var) (result[mean]) collect combine Tbl = D1 D2 collect layout (collection[D1 D2]#var) (result[mean]) collect style header collection, level(hide)
Comment