Skip to content

Instantly share code, notes, and snippets.

tt <- tryCatch(hostmp <- read.config(file = "hosp.yaml"),
error=function(e) e,
warning=function(w) w)
ifelse(is(tt,"warning"),"Hospital Configuration Warning/Error.
Please ensure configuration file has terminating empty line.",
"Hospital Configuration OK")
hosplu <- data.frame(matrix("", ncol = 4, nrow = 0))
hosplu <- do.call(rbind, lapply(hostmp, data.frame, stringsAsFactors = F))
hosplu <- as.data.frame(apply(hosplu, 2, trim), stringsAsFactors = F)