You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In pqR-2014-09-30, user-defined replacement functions can sometimes immediately modify their argument, which is fast, but not entirely safe. For example, after
> `f<-` <- function (x,value) { x[1] <- 1; stop("error") }
> a<-numeric(10); a[1] <- 3; f(a) <- 4
Error in `f<-`(a, value = 4) : error
> a
[1] 1 0 0 0 0 0 0 0 0 0
we see that a[1] has changed even though the replacement function exited with an error.
This is the result of a combination of a[1] <- 3 letting "a" get a NAMEDCNT of 0, which is generally unnoticeable since it is fixed up later, and invokation of user-defined replacement functions not doing the usual fixup. These problems are now corrected in development branch 30.
The text was updated successfully, but these errors were encountered:
In pqR-2014-09-30, user-defined replacement functions can sometimes immediately modify their argument, which is fast, but not entirely safe. For example, after
we see that a[1] has changed even though the replacement function exited with an error.
This is the result of a combination of a[1] <- 3 letting "a" get a NAMEDCNT of 0, which is generally unnoticeable since it is fixed up later, and invokation of user-defined replacement functions not doing the usual fixup. These problems are now corrected in development branch 30.
The text was updated successfully, but these errors were encountered: