Skip to content
Prev 30290 / 63421 Next

changed behaviour of 'get' in 2.8.0: request for unchange

Returning the internal R_MissingArg token was a bug.  From the svn
logs it looks like I fixed this bug back in June (so has been in
R-devel for a while) along with fixing a bug in the way system.time
used to be defined.  I no longer recall the details but suspect the
need to fix this arose in testing the fix to system.time.  The other
accessors should not retrun R_MissingArg either and will be fixed in
due course.

If your code is relying on this behavior then it would be a good idea
to have a look at your code and figure out why, as there is very
little useful that can be done with this missing arg token.  If after
that it turns out that there is a need to be able to test for whether
a binding represents a missing value then we can look into adding a
function that tests for this.  There is already sone desire to have a
way of checking whether a binding contains a delayed evaluation, so
maybe something like a function bindingStatus that returns one of
"active", "missing", "delayed" or "evaluated" makes sense.

You can use try or tryCatch to catch the error, but there is no clean
way currently to catch just this error.  Eventually we should have our
internaly signaled errors signal errors with a specific class so that
one could write something like

     tryCatch(get('x'), missingArgumentError = function(e) ...)

That is a ways off though.

Best,

luke
On Fri, 24 Oct 2008, Mark.Bravington at csiro.au wrote: