Re: [Rd] locked environments

2016-04-21 Thread luke-tierney
Ideally they should all work. What is happening is that the current implementation of complex assignment wants to use a temporary variable named *tmp*, which it can't when the evaluation environment is locked. Assignments in compiled code use a different mechanism that I hope will eventually be po

[Rd] locked environments

2016-04-20 Thread William Dunlap via R-devel
Shouldn't the following 4 ways to alter an object in a locked environment either all work or all fail? (All working would be nice, I think.) E <- new.env() assign("var", c(1,2,3,4), envir=E) lockEnvironment(E, bindings=FALSE) E$var[1] <- 101 ; E$var #[1] 101 2 3 local(var[2]