(v0.7.1.9075) new microorganism codes

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2019-09-18 15:46:09 +02:00
1 parent f553a08a7b
commit e2aa4f996b
53 files changed
+636 -475

No files matched your search

+23 -23
View File
@@ -54,29 +54,29 @@
.onAttach <- function(...) {
if (interactive() & !isFALSE(getOption("AMR_survey"))) {
options(AMR_survey = FALSE)
console_width <- options()$width - 1
url <- "https://www.surveymonkey.com/r/AMR_for_R"
txt <- paste0("Thanks for using the AMR package! ",
"As researchers, we are interested in how and why you use this package and if there are things you're missing from it. ",
"Please fill in our 2-minute survey at: ", url, ". ",
"This message can be turned off with: options(AMR_survey = FALSE)")
# make it honour new lines bases on console width:
txt <- unlist(strsplit(txt, " "))
txt_new <- ""
total_chars <- 0
for (i in 1:length(txt)) {
total_chars <- total_chars + nchar(txt[i]) + 1
if (total_chars > console_width) {
txt_new <- paste0(txt_new, "\n")
total_chars <- 0
}
txt_new <- paste0(txt_new, txt[i], " ")
}
# packageStartupMessage(txt_new)
}
# if (interactive() & !isFALSE(getOption("AMR_survey"))) {
# options(AMR_survey = FALSE)
# console_width <- options()$width - 1
# url <- "https://www.surveymonkey.com/r/AMR_for_R"
# txt <- paste0("Thanks for using the AMR package! ",
# "As researchers, we are interested in how and why you use this package and if there are things you're missing from it. ",
# "Please fill in our 2-minute survey at: ", url, ". ",
# "This message can be turned off with: options(AMR_survey = FALSE)")
#
# # make it honour new lines bases on console width:
# txt <- unlist(strsplit(txt, " "))
# txt_new <- ""
# total_chars <- 0
# for (i in 1:length(txt)) {
# total_chars <- total_chars + nchar(txt[i]) + 1
# if (total_chars > console_width) {
# txt_new <- paste0(txt_new, "\n")
# total_chars <- 0
# }
# txt_new <- paste0(txt_new, txt[i], " ")
# }
# # packageStartupMessage(txt_new)
# }
}
#' @importFrom data.table as.data.table setkey