.rs.environment.isSuspendableImpl and Reference Class objects with [[ method.

I've got what is probably a unique situation, and I'm looking for a good solution.

I have a reference class, called Pnode and it has a method for [[. I've started issuing a depricated warning for some uses of [[. However, this gets called by the RStudio IDE outside of my command being run.

This was resulting in some strange looking warnings:

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

This puzzled me, as I had no idea where "[[" was getting called. I finally figured it out. It gets called from the function
.rs.environment.isSuspendableImpl, which has one branch of the code for "is.environment", which then calls value[[key]] which triggers the warning.

This function seems to come from tools::rstudio. I'm not sure if there is some way to override this function in my package, or weather I need to use some hack like throwing an error instead of a warning if I detect .rs.environment.isSuspendable in the call stack.

I guess another solution which would work for me (and might be a decent idea) is to muffle warnings in .rs.environment.isSuspendable. I'm guessing this would not be a high priority fix as it seems to occur only at the intersection of who widely

Any suggestions?

Agree this might be useful. What I'd recommend is the following:

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.