Warning messages generated by RStudio Environment display

I'm getting a mysterious message which is happening somewhere in the RStudio IDE.

> 14
[1] 14
Warning message:
In .local(x, i, j, ...) :
  Use of '[[' with chance nodes is depricated: Use numericPart and '['.

The warning is obviously not coming from my code. I suspect that it is it is happening when RStudio is updating the "Environment" tab.

More details. I have installed a package called RNetica (R-universe: personal package repositories for R!). This is my package, so I know it well. The warning message is something that I have written. It is associated with an object of type RNetica::NeticaNode. This class has a toString and show method. So I don't know why RStudio is trying to deconstruct the object.

What is the .local function referenced in the error message? How is it defined? If I knew that, I could figure out why the [[ method is getting called on the NeticaNode object.

I'm trying hard to make a small reproduceable example, but it seems to be intermittent. In particular, I can't seem to trap the errors or get a traceback of where the error is occurring. Any suggestion of how to debug this would be helpful.

There is a pretty easy way to figure out if this is the case. You can tell RStudio to stop updating the Environment tab by clicking on the menu to the left of the Refresh button (in the top right of the Environment tab) and clicking "Manual Refresh Only":

image

In manual refresh mode, the tab only updates when you ask it to (by clicking the refresh button). Try that mode -- see if it makes the message go away (and if clicking Refresh triggers the warning).

Thanks for letting me know about manual refresh mode, however, what I really want to know is what R function RStudio is calling when doing the refresh. I want to find out why it is trying to use the [[ function on an object which is not a list, and see if I can get it to avoid triggering the warning in my package.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.