R/utils.r

Defines functions get_header is_integer

get_header <- function(x, sep = ",") {
  readLines(x, n = 1) %>%
    stringr::str_split(sep) %>%
    `[[`(1) %>%
    trimws()
}

is_integer <- function(x) {
  is.integer(x) || (is.numeric(x) && all(x == as.integer(x)))
}
mstrimas/auklet documentation built on May 29, 2019, 2:57 p.m.