Skip to content
Prev 903 / 12125 Next

[R-pkg-devel] Absent variables and tibble

On 28/06/2016 1:15 PM, Duncan Murdoch wrote:
After looking at a few cases, I don't think I'll do that.  Often the 
test is used to find out if x$name will work.  hasName(x, "name") is not 
sufficient for that:  x might have that as a name, but x$name won't 
work, e.g. in a named numeric vector.  I don't think we have a simple 
test corresponding to

!is.null(x$name) && hasName(x, "name")

Probably the best approach is to run tests with 
options(warnPartialMatchDollar = TRUE), and just use the simple 
!is.null(x$name).

Duncan Murdoch