R/throw_messages.R

Defines functions throw_messages

throw_messages <- function(x) {
  if (length(x) == 0L) return()

  if (is.vector(x))
    for (i in 1:length(x)) {
      message(x[i])
    }
  if (is.data.frame(x)) {
    for (i in 1:nrow(x)) {
      st <- paste0("BDS ", format(x[i, 1L], width = 3, justify = "right")," (",
                   x[i, 2L], "): Supplied: ",
                   x[i, 4L], ", Supplied type: ",
                   x[i, 5L])
      message(st)
    }
  }
}
stefvanbuuren/minihealth documentation built on March 11, 2021, 7:10 p.m.