arnima@u.washington.edu
2004-Dec-28 02:04 UTC
[Rd] Print()ing Latin 1 in console (PR#7452)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
---1936847062-1954375969-1104189110=:161308
Content-Type: TEXT/PLAIN; CHARSET=iso-8859-1; FORMAT=flowed
Content-Transfer-Encoding: 8BIT
Content-ID: <Pine.A41.4.61b.0412271512521.161308@dante65.u.washington.edu>
Latin 1 characters are handled correctly by many R functions, but print()
behaves unpredictably in this respect. Using ten Icelandic characters as
an example:
ICE <- c("?", "?", "?", "?",
"?", "?", "?", "?", "?",
"?")
# or, in case of browser problems
ICE <- c("\301", "\320", "\311",
"\315", "\323",
"\332", "\335", "\336",
"\306", "\326")
ice <- tolower(ICE)
cat(ICE, "\n") # correct
cat(ice, "\n") # correct
ICE # some octal codes
ice # some octal codes
data.frame(ICE, ice) # some octal codes
It would be preferable if the characters in that last data frame were
human-readable. This bug was not present in R 1.9.0.
Thanks,
Arni
R 2.0.1 on WinXP
---1936847062-1954375969-1104189110=:161308--
Please see https://stat.ethz.ch/pipermail/r-help/2004-November/060119.html for the explanation and solution (2.0.1 patched) regarding this Windows infelicity. Try 2.0.1 patched, and see if it resolves your problem. On Tue, 28 Dec 2004 arnima@u.washington.edu wrote:> This message is in MIME format. The first part should be readable text, > while the remaining parts are likely unreadable without MIME-aware tools. > > ---1936847062-1954375969-1104189110=:161308 > Content-Type: TEXT/PLAIN; CHARSET=iso-8859-1; FORMAT=flowed > Content-Transfer-Encoding: 8BIT > Content-ID: <Pine.A41.4.61b.0412271512521.161308@dante65.u.washington.edu> > > Latin 1 characters are handled correctly by many R functions, but print() > behaves unpredictably in this respect. Using ten Icelandic characters as > an example: > > ICE <- c("?", "?", "?", "?", "?", "?", "?", "?", "?", "?") > # or, in case of browser problems > ICE <- c("\301", "\320", "\311", "\315", "\323", > "\332", "\335", "\336", "\306", "\326") > ice <- tolower(ICE) > > cat(ICE, "\n") # correct > cat(ice, "\n") # correct > ICE # some octal codes > ice # some octal codes > data.frame(ICE, ice) # some octal codes > > It would be preferable if the characters in that last data frame were > human-readable. This bug was not present in R 1.9.0. > > Thanks, > Arni > > R 2.0.1 on WinXP > ---1936847062-1954375969-1104189110=:161308-- > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >-- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Breiviksveien 40, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93 e-mail: Roger.Bivand@nhh.no
The 2.0.1 patch works beautifully. I should have checked that before asking. Thanks, Arni On Tue, 28 Dec 2004, Roger Bivand wrote:> Please see > https://stat.ethz.ch/pipermail/r-help/2004-November/060119.html for the > explanation and solution (2.0.1 patched) regarding this Windows > infelicity. Try 2.0.1 patched, and see if it resolves your problem. > > > > On Tue, 28 Dec 2004 arnima@u.washington.edu wrote: > >> Latin 1 characters are handled correctly by many R functions, but >> print() behaves unpredictably in this respect. Using ten Icelandic >> characters as an example: >> >> ICE <- c("?", "?", "?", "?", "?", "?", "?", "?", "?", "?") >> # or, in case of browser problems >> ICE <- c("\301", "\320", "\311", "\315", "\323", >> "\332", "\335", "\336", "\306", "\326") >> ice <- tolower(ICE) >> >> cat(ICE, "\n") # correct >> cat(ice, "\n") # correct >> ICE # some octal codes >> ice # some octal codes >> data.frame(ICE, ice) # some octal codes >> >> It would be preferable if the characters in that last data frame were >> human-readable. This bug was not present in R 1.9.0. >> >> Thanks, >> Arni >> >> R 2.0.1 on WinXP >