[Rd] residual '*tmp*' variable after "[<-" error

From: Parlamis Franklin <fparlamis_at_mac.com>
Date: Wed 20 Sep 2006 - 20:38:50 GMT

self-sanity check prior to filing a bug report:

attempted replacement that generates an error leaves a '*tmp*' variable in the global environment.

test <- 1:10
test[2:4] <- expression(e)

i've read section 3.4.4 of the "R Language Definition" which discusses the mechanism for replacement, and it is not clear to me whether this was intended, but i suspect not (to be honest, it's not clear to me why the process as described doesn't generate an infinite recursion -- perhaps the primitive treats the argument named '*tmp*' different than other arguments). i've also searched the R site, and can't find this particular issue discussed.

even though, as below, i am using 2.4.0 alpha, this happens as well in 2.3.1.

from my standpoint, desirable behavior would be:

(i) if an error occurs, remove the '*tmp*' variable
(ii) report the error as occurring in the original replacement call  
(rather than the '*tmp*' replacement, which may be confusing to those  
who haven't read the "R Language Definition")

franklin parlamis

> version

platform       powerpc-apple-darwin8.7.0
arch           powerpc
os             darwin8.7.0
system         powerpc, darwin8.7.0
status         alpha
major          2
minor          4.0
year           2006
month          09
day            06
svn rev        39158
language       R

version.string R version 2.4.0 alpha (2006-09-06 r39158)

R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu Sep 21 06:46:49 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 20 Sep 2006 - 22:30:11 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.