Open juliasilge opened 3 months ago
The future package has a special assignment operator %<-%
:
https://future.futureverse.org/reference/future.html
I just tested this out, and it turns out you can do it with right assignment too! 😵
library(future)
x <- rnorm(1000)
{ median(x) } %globals% list(x = x, median = stats::median) %->% y
I am not sure how we might want to handle this kind of thing, given the vast constellation of operators that packages can contribute.
Same issue in RStudio. This is a very hard problem to get right in the general case.
Steps to fix:
declare()
annotations.
Discussed in https://github.com/posit-dev/positron-beta/discussions/174