R/ca_ressemble_a_un_nombre.R

Defines functions look_like_a_number

Documented in look_like_a_number

#' return TRUE if this look like a number
#'
#' @param vec a vector
#'
#' @return un booleen
#' @export
#'
look_like_a_number <- function( vec){
  if ( assertthat::is.date(vec)){return(FALSE)}
  sum(is.na(vec)) == sum(is.na(
    suppressWarnings(
      as_mon_numeric(vec)
    )
  ))
}
ThinkR-open/thinkr documentation built on Aug. 25, 2022, 2:45 p.m.