RevolutionAnalytics / RRO

Revolution R Open
http://mran.revolutionanalytics.com/download/
GNU General Public License v2.0
86 stars 25 forks source link

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

Open marqisoft opened 8 years ago

marqisoft commented 8 years ago

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/