mirror of
https://github.com/msberends/AMR.git
synced 2026-11-16 02:20:49 +01:00
(v2.1.1.9163) cleanup
This commit is contained in:
1 parent
68efddab3d
commit
07efc292bc
73 files changed
+2187
-1715
No files matched your search
@@ -29,8 +29,8 @@
|
||||
|
||||
#' Export Data Set as NCBI BioSample Antibiogram
|
||||
#'
|
||||
#'
|
||||
#' @param x a data set
|
||||
#'
|
||||
#' @param x a data set
|
||||
#' @param filename a character string specifying the file name
|
||||
#' @param type a character string specifying the type of data set, either "pathogen MIC" or "beta-lactamase MIC", see <https://www.ncbi.nlm.nih.gov/biosample/docs/>
|
||||
#' @keywords internal
|
||||
@@ -43,11 +43,11 @@ export_ncbi_biosample <- function(x,
|
||||
meet_criteria(filename, allow_class = "character", has_length = 1)
|
||||
meet_criteria(type, allow_class = "character", has_length = 1, is_in = c("pathogen MIC", "beta-lactamase MIC"))
|
||||
meet_criteria(save_as_xlsx, allow_class = "logical", has_length = 1)
|
||||
|
||||
|
||||
out <- x %pm>%
|
||||
pm_select(columns)
|
||||
stop_if(NROW(out) == 0, "No columns found.")
|
||||
|
||||
|
||||
if (isTRUE(save_as_xlsx)) {
|
||||
export <- import_fn("write.xlsx", pkg = "openxlsx", error_on_fail = TRUE)
|
||||
export(out, file = filename, overwrite = TRUE, asTable = FALSE)
|
||||
|
||||
Reference in new issue
Block a user