Re: [R-pkg-devel] Assigning values to fields in Reference Classes

2020-05-11 Thread Per Nyfelt
I developed a package where reference classes is used a lot. When submitting it to CRAN i got the feedback that  i should not use <<- as that was "modifying the global environment". That was a misunderstanding that was sorted out but before it was, I started to investigate alternative ways to a

Re: [R-pkg-devel] Assigning values to fields in Reference Classes

2020-05-11 Thread Bert Gunter
What does this have to do with package development? Seems more like a query for r-help. Cheers, Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, May 11, 2020

[R-pkg-devel] Assigning values to fields in Reference Classes

2020-05-11 Thread Per Nyfelt
Hi, I have been playing with alternative ways to assign values to fields in reference classes. Besides the "standard" <<- there are two other ways that also "seems to work". One is using .self$fieldName assigned with <- and the the other one is field(fieldName, value). With regards to the