Closed MichaelChirico closed 4 years ago
I can reproduce this on Windows in RGui running in Chinese locale, on Linux the output is fine. The issue is caused by the fonts; with many fonts, the ideographic full stop symbol ("\u3002") is printed as too narrow, which includes the default font in RGui on my system. This is not a problem of how R formats the matrices when printing - the number of characters emitted is correct, which can be seen when the output is pasted to another application with properly fixed-width fonts. On my system, switching RGui to NSimSun font (a Simplified Chinese font) solves the problem.
For reference, a smaller example to reproduce:
matrix(nrow=2, c("做", "。", "x", "x"))
Thanks for investigating Thomas, I can also solve this by changing fonts.
Originally filed with RStudio but Ron Blum helpfully pointed out this affects the R GUI too (at least on Mac, unconfirmed on other OS)
https://github.com/rstudio/rstudio/issues/5992
Reproducing the issue here:
The vertical alignment of the printed output is all out of whack. Possibly related to:
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17625 https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16186
But neither of those mentions the GUI specifically.
We can also get the issue with using matrix() only (i.e. it's not a data.frame printing issue, probably the root is in matrix formatting)
METADATA