#' @rdname hides
#' @export
hides_num <- function(x, ...){
UseMethod("hides_num")
}
hides_num.character <- function(x,na.values=NULL, ...){
sum(is.na(x) | x %in% na.values) == sum(is.na(suppressWarnings(as.numeric(x))))
}
hides_num.factor <- function(x, na.values=NULL, ...){
hides_num(as.character(x),na.values)
}
hides_num.numeric <- function(x, na.values=NULL, obvious = FALSE, ...){
obvious
}
hides_num.default <- function(x, na.values=NULL, ...){
FALSE
}
hides_num.list <- function(x, na.values=NULL, obvious = FALSE, ...){
sapply(x, hides_num, na.values = na.values, obvious = obvious)
}
hides_num.data.frame <- function(x, na.values=NULL, obvious = FALSE, ...){
hides_num.list(x, na.values, obvious)
}
hides_num.environment <- function(x, na.values=NULL, obvious = FALSE, ...){
sapply(x, hides_num, na.values, obvious)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.