Created
May 17, 2018 06:34
-
-
Save t-student/a48df761ad54bda0bbba905fa0c0e7aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
hosplu <- as.data.frame(apply(hosplu, 2, as.character), stringsAsFactors = F) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment