Thank you for the clarification! Wow, I do not know the same rule
applies to the list object. Maybe that's because the list object will
give NULL not an error. I might have incorrectly used it in my
package.
Best,
Jiefei
On Sun, Mar 28, 2021 at 3:26 AM Bill Dunlap wrote:
>
> > > It looks like wh
> > It looks like when calling the dollar symbol using the function format, it
> > treats the input argument as a character literal and does not evaluate it
> > inside the function. I know we have the function `field` to get the slot
> > variable, but I wonder if this is designed on purpose as the
Thanks, Duncan. Below is the repost of my question in plain text mode.
I'm trying to get the field value of a reference object by the field
name, but the dollar symbol behaves quite unusual. See example below
.foo <- setRefClass(
"foo",
fields = list(
a = "integer"
)
)
x <- .
On 27/03/2021 10:16 a.m., Jiefei Wang wrote:
Hi all,
I'm trying to get the field value of a reference object by the field name,
but the dollar symbol behaves quite unusual. See example below
*.foo <- setRefClass("foo",fields = list(a = "integer"
))x <- .foo$new(a=1L