From 94a48578adc3d86c0e6b68a3435dcf83818feca4 Mon Sep 17 00:00:00 2001 From: pdiakumis Date: Fri, 18 Oct 2024 23:56:58 +1100 Subject: [PATCH] Wf writer: output prefix --- R/Wf.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/Wf.R b/R/Wf.R index 4f23fc6..9d35956 100644 --- a/R/Wf.R +++ b/R/Wf.R @@ -209,6 +209,7 @@ Wf <- R6::R6Class( #' @param drid dracarys ID to use for the dataset (e.g. `wfrid.123`, `prid.456`). write = function(x, outdir = NULL, prefix = NULL, format = "tsv", drid = NULL) { assertthat::assert_that(!is.null(prefix)) + assertthat::assert_that(all(c("name", "data") %in% colnames(x))) if (!is.null(outdir)) { prefix <- file.path(outdir, prefix) } @@ -219,7 +220,7 @@ Wf <- R6::R6Class( out = list(write_dracarys(obj = .data$data, prefix = .data$p, out_format = format, drid = drid)) ) |> dplyr::ungroup() |> - dplyr::select("name", "data") + dplyr::select("name", "data", prefix = "p") invisible(d_write) } ) # end public