MUCollective / multiverse

R package for creating explorable multiverse analysis
https://mucollective.github.io/multiverse/
GNU General Public License v3.0
62 stars 5 forks source link

create modify-in-place for `$<-.multiverse` #5

Closed abhsarma closed 5 years ago

abhsarma commented 5 years ago

We can't use the $<- operator on the multiverse as it doesn't support modify-in-place behavior. This might be because R creates a copy of the first argument passed (the multiverse object) in *tmp*.

Might have to switch back to a custom infix operator.

mjskay commented 5 years ago

Hmmm... What if we use an r6 object embedded in the multiverse to actually contain everything in it? Then it's fine if the wrapper is copy on modify semantics because the object it wraps that actually contains everything is properly updated