Skip to content

Symbol last.warning locked needlessly? (causes problems with Tinn-R) #307

@marqisoft

Description

@marqisoft

Like many other users of R or MRO, I use an enhanced IDE for programming in R language. My choice is Tinn-R (https://sourceforge.net/projects/tinn-r/). But there is a subtle difference in the properties of the "last.warning" symbol betwenn R and MRO, which prevents useful Tinn-R features from working.

Precisely, when I use the keyboard shortcuts in Tinn-R for displaying the list of the relevant parameters with their default values for a function, e.g. "function(cursor here and k. shortcut...", it should show something... But instead, in MRO, the following error message appears in the R console:

Error in assign("last.warning", last.warning, envir = baseenv()) :
cannot change value of locked binding for 'last.warning'

I found a workaround, however, which may give you an idea of what's going on behind this problem. By adding the following line of code in the Rprofile.site config file in the "etc" folder of MRO, the error is no more, and the Tinn-R tip&completion features work again:

unlockBinding("last.warning", baseenv())

Still, it would be better if you could unlock the "last.warning" symbol, unless its current locked status has some use elsewhere...?

In any case, thanks for ckecking this up. And have a nice day.

Marc (alias marQIsoft)

p.s. Note that I had posted a detailed ticket for Tinn-R, before I found the problem was caused by MRO. You may read it at: https://sourceforge.net/p/tinn-r/bugs/93/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions