Hello,

When a data.frame contains column names with accentued characters 
(UTF8 encoded), the alignement of the column names is wrong (extra
spaces inserted).

For example : ------------------------------------------------

> Sys.getlocale()
[1] "[EMAIL PROTECTED];LC_NUMERIC=C;[EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL 
PROTECTED];[EMAIL 
PROTECTED];LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C"

> print (data.frame(aaaa=1, b=2, c=3)) # (ok)
  aaaa b c
1    1 2 3


> print (data.frame(éééé=1, b=2, c=3)) # (extra blanks)
  éééé b c
1        1 2 3

--------------------------------------------------------------

This is probably due to fact that the number of white spaces
to insert between the columns is computed using the length 
of the column names (in bytes) instead of their width (in 
characters), which are different in the example above.

The problem is the same (extra spaces inserted) with
print.data.frame(..., right = FALSE).

Thanks,
Cyril


--please do not edit the information below--

Version:
 platform = i386-pc-linux-gnu
 arch = i386
 os = linux-gnu
 system = i386, linux-gnu
 status = 
 major = 2
 minor = 1.0
 year = 2005
 month = 04
 day = 18
 language = R

Search Path:
 .GlobalEnv, package:methods, package:stats, package:graphics, 
package:grDevices, package:utils, package:datasets, Autoloads, package:base

______________________________________________
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to