[Rd] names(unlist(...)) may construct corrupt strings (PR#1524)
oehl_list@gmx.de
oehl_list@gmx.de
Tue, 7 May 2002 13:15:50 +0200 (MET DST)
names(unlist(...)) seems to be able to construct corrupt strings
detected via: two identical strings behave different in paste
observed in RW1.4.1 and RW1.5.0
pure replication code after output
Best
Jens Oehlschlägel
> l <- names(unlist(list(aa = list(bb = 1))))
> l
[1] "aa.bb"
> # this is exactly "aa.bb"
> identical(l, "aa.bb")
[1] TRUE
>
> # BUT
> identical(paste("aa.bb", "this should be added"), paste(l, "this should be
added"))
[1] FALSE
>
> # this of course works
> paste("aa.bb", "this should be added")
[1] "aa.bb this should be added"
>
> # BUT THIS FAILS
> paste(l, "this should be added")
[1] "aa.bb"
l <- names(unlist(list(aa = list(bb = 1))))
l
# this is exactly "aa.bb"
identical(l, "aa.bb")
# BUT
identical(paste("aa.bb", "this should be added"), paste(l, "this should be
added"))
# this of course works
paste("aa.bb", "this should be added")
# BUT THIS FAILS
paste(l, "this should be added")
--please do not edit the information below--
Version:
platform = i386-pc-mingw32
arch = i386
os = mingw32
system = i386, mingw32
status =
major = 1
minor = 5.0
year = 2002
month = 04
day = 29
language = R
Windows 2000 Professional (build 2195) Service Pack 1.0
Search Path:
.GlobalEnv, package:ctest, Autoloads, package:base
--
GMX - Die Kommunikationsplattform im Internet.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._