@@ -129,7 +129,7 @@ function show(io::IO, ct::CoefTable)
129
129
end
130
130
131
131
sepsize = 3
132
- hdots = " \u 2026 "
132
+ hdots = " … "
133
133
mat = [j == 1 ? NoQuote (rownms[i]) :
134
134
j- 1 == ct. pvalcol ? NoQuote (sprint (show, PValue (cols[j- 1 ][i]))) :
135
135
j- 1 in ct. teststatcol ? TestStat (cols[j- 1 ][i]) :
@@ -146,29 +146,31 @@ function show(io::IO, ct::CoefTable)
146
146
147
147
# remove columns that do not fit on the screen
148
148
maxcols = length (A)
149
- totwidth = sum (sum .(A)) + 2 * (length (A) - 1 )+ sepsize
150
149
if maxcols < nc+ 1
151
150
ncols = min (nc, maxcols)
152
151
mat = mat[:, 1 : ncols]
152
+ mat = hcat (mat, [hdots for i in 1 : nr])
153
153
colnms = colnms[1 : ncols]
154
- sepsize = length (hdots)+ 1
154
+ sepsize = textwidth (hdots)+ 1
155
155
else
156
156
sepsize = 0
157
157
end
158
158
159
159
# print table
160
- totwidth = sum (sum .(A)) + 2 * (length (A) - 1 )+ sepsize
160
+ totwidth = sum (sum, A) + 2 * (maxcols - 1 ) + sepsize
161
+
161
162
println (io, repeat (' ─' , totwidth))
162
163
print (io, repeat (' ' , sum (A[1 ])))
163
164
for j in 1 : maxcols- 1
164
165
print (io, " " , lpad (colnms[j], sum (A[j+ 1 ])))
165
166
end
166
167
maxcols < nc+ 1 && print (io, lpad (hdots, sepsize))
167
168
println (io, ' \n ' , repeat (' ─' , totwidth))
168
- for i in 1 : size (mat, 1 )
169
- Base. print_matrix_row (io, mat, A, i, 1 : size (mat, 2 ), " " )
170
- maxcols < nc+ 1 && print (io, lpad (hdots, sepsize))
171
- i != size (mat, 1 ) && println (io)
169
+ m, n = size (mat)
170
+ for i in 1 : m
171
+ Base. print_matrix_row (io, mat, A, i, 1 : n, " " )
172
+ maxcols < nc+ 1 && (i+ 4 )% 5 == 0 && print (io, lpad (hdots, sepsize))
173
+ i != m && println (io)
172
174
end
173
175
print (io, ' \n ' , repeat (' ─' , totwidth))
174
176
nothing
0 commit comments