Skip to content
Prev 389138 / 398506 Next

Evaluating lazily 'f<-' ?

Hello,


I have found the evaluation: it is described in the section on 
subsetting. The forced evaluation makes sense for subsetting.
On 9/13/2021 9:42 PM, Leonard Mada wrote:
The forced evaluation is relevant for subsetting, e.g.:
expression(r(x)[3] <- 1)
expression(r(x)[3] <- 1)[[1]][[2]]
# r(x)[3] # the evaluation details are NOT visible in the expression per se;
# Note: indeed, it makes sens to first evaluate r(x) and then to perform 
the subsetting;


However, in the case of a non-subsetted expression:
r(x) <- 1;
It would make sense to evaluate lazily r(x) if no subsetting is involved 
(more precisely "r<-"(x, value) ).

Would this have any impact on the current code?


Sincerely,


Leonard