Skip to content
Prev 891 / 12125 Next

[R-pkg-devel] Absent variables and tibble

On 27/06/2016 1:09 PM, Hadley Wickham wrote:
Yes, I'd consider it.  I think hasName() would be more consistent with 
other has*() functions in the R sources.

I guess the implementation should be defined to be equivalent to

hasName <- function(x, name)
   name %in% names(x)

though it would make sense to make a faster internal implementation; 
!is.null(df$x) is quite a bit faster than "x" %in% names(df).

Duncan Murdoch