[Rd] odd behavior of names

William Dunlap wdunl@p @ending from tibco@com
Sun Jul 29 19:06:40 CEST 2018


Bugzilla issue 16101 describes another first-list-name-printed-differently
oddity
with the Windows GUI version of R:

> a <- "One is \u043E\u0434\u0438\u043D\nTwo is \u0434\u0432\u0430\n"
> Encoding(a) # expect "UTF-8"
[1] "UTF-8"
> sapply(strsplit(a, "\n")[[1]], charToRaw)[c(1,1,2)]
$`One is один`
 [1] 4f 6e 65 20 69 73 20 d0 be d0 b4 d0
[13] b8 d0 bd

$`One is <U+043E><U+0434><U+0438><U+043D>`
 [1] 4f 6e 65 20 69 73 20 d0 be d0 b4 d0
[13] b8 d0 bd

$`Two is <U+0434><U+0432><U+0430>`
 [1] 54 77 6f 20 69 73 20 d0 b4 d0 b2 d0
[13] b0

> names(.Last.value)
[1] "One is один" "One is один"
[3] "Two is два"





Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Sun, Jul 29, 2018 at 8:45 AM, David Winsemius <dwinsemius using comcast.net>
wrote:

>
> > On Jul 29, 2018, at 6:31 AM, Gabor Grothendieck <ggrothendieck using gmail.com>
> wrote:
> >
> > The first component name has backticks around it and the second does
> > not. Though not wrong, it seems inconsistent.
> >
> > list(a = 1, b = 2)
> > ## $`a`
> > ## [1] 1
> > ##
> > ## $b
> > ## [1] 2
> >
> > R.version.string
> > ## [1] "R version 3.5.1 Patched (2018-07-02 r74950)"
>
> Agree it would be unexpected. Unable to reproduce on Mac:
>
> list(a = 1, b = 2)
> #------
> $a
> [1] 1
>
> $b
> [1] 2
>
>  R.version.string
> #[1] "R version 3.5.1 (2018-07-02)"
> Platform: x86_64-apple-darwin15.6.0 (64-bit)
>
>
> >
> >
> >
> > --
> > Statistics & Software Consulting
> > GKX Group, GKX Associates Inc.
> > tel: 1-877-GKX-GROUP
> > email: ggrothendieck at gmail.com
> >
> > ______________________________________________
> > R-devel using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
>
> David Winsemius
> Alameda, CA, USA
>
> 'Any technology distinguishable from magic is insufficiently advanced.'
>  -Gehm's Corollary to Clarke's Third Law
>
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

	[[alternative HTML version deleted]]



More information about the R-devel mailing list