This post (Lazy evaluation in R – is assign affected?) covers some common ground but I am not sure it answers my question.
I stopped using assign
when I
I'd like to point out that assign
is meant to be used with environment
s.
From that point of view, the "bad" thing in the example above is using a not quite appropriate data structure (the base environment instead of a list
or data.frame
, vector
, ...).
Side note: also for environment
s, the $
and $<-
operators work, so in many cases the explicit assign
and get
isn't necessary there, neither.