Bug 15354 - mget not duplicating as necessary
mget not duplicating as necessary
Status: CLOSED FIXED
Product: R
Classification: Unclassified
Component: Low-level
R 3.0.0
Other Other
: P5 normal
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-25 01:46 UTC by Duncan Murdoch
Modified: 2013-06-30 14:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan Murdoch 2013-06-25 01:46:19 UTC
Found by Radford Neal:

A bug in mget, illustrated by the following code:
      
         a <- numeric(1)
         x <- mget("a",as.environment(1))
         print(x)
         a[1] <- 9
         print(x)

gives result

>  a <- numeric(1)
>          x <- mget("a",as.environment(1))
>          print(x)
$a
[1] 0

>          a[1] <- 9
>          print(x)
$a
[1] 9
Comment 1 Duncan Murdoch 2013-06-30 14:33:55 UTC
Fixed in R-devel r63113, soon in R-patched.