Displaying 2 results from an estimated 2 matches for "not_a_variable".
2024 May 11
1
R hang/bug with circular references and promises
The following code snippet causes R to hang. This example might be a
bit contrived as I was experimenting and trying to understand
promises, but uses only base R.
It looks like it is looking for "not_a_variable" recursively but since
it doesn't exist it goes on indefinitely.
x0 <- new.env()
x1 <- new.env(parent = x0)
parent.env(x0) <- x1
delayedAssign("v", not_a_variable, eval.env=x1)
delayedAssign("w", v, assign.env=x1, eval.env=x0)
x1$w
2024 May 11
1
[External] R hang/bug with circular references and promises
On Sat, 11 May 2024, Travers Ching wrote:
> The following code snippet causes R to hang. This example might be a
> bit contrived as I was experimenting and trying to understand
> promises, but uses only base R.
>
> It looks like it is looking for "not_a_variable" recursively but since
> it doesn't exist it goes on indefinitely.
>
> x0 <- new.env()
> x1 <- new.env(parent = x0)
> parent.env(x0) <- x1
> delayedAssign("v", not_a_variable, eval.env=x1)
> delayedAssign("w", v, assign.env=x1, eval.env=x0)...