R/assert.r

assert_is_line_code <- function(x) {
  codes <- c("RD", "YL", "GR", "BL", "OR", "SV")
  if (!(x %in% codes)) {
    stop(paste("line code should be one of" , paste(codes, collapse = ",")), call. = FALSE)
  }
}
zamorarr/wmata documentation built on May 11, 2019, 8:29 p.m.