R/split_line.R

Defines functions split_line

split_line <- function(line) {

  line_args <-
    line %>%
    stringr::str_split_fixed(
      pattern = " ",
      n = 6L
      ) %>%
    apply(
      MARGIN = 2L,
      FUN = identity
      ) %>%
    lapply(
      FUN = identity
      ) %>%
    magrittr::set_names(
      c("minute", "hour", "day_of_month", "month", "weekday", "description")
      )

  return(line_args)

}
aecoleman/crontabr documentation built on Jan. 10, 2020, 10:20 a.m.