R/hides_vec.R

#' @rdname hides
#' @export
hides_vec <- function(x, ...){
  UseMethod("hides_vec")
}

hides_vec.list <- function(x, ...){
  all(lengths(x) == 1) &&
    length(unique(sapply(x,typeof))) == 1
}

hides_vec.environment <- function(x, ...){
  hides_vec.list (x, ...)
}

hides_vec.data.frame <- function(x, ...){
  hides_vec.list (x, ...)
}

hides_vec.default <- function(x,na.values=NULL, obvious = FALSE, ...){
  if (is.vector(x)) return(obvious)
  FALSE
}
moodymudskipper/hidden documentation built on May 20, 2019, 9:59 a.m.