Skip to content

Commit

Permalink
Wf writer: output prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
pdiakumis committed Oct 18, 2024
1 parent 9c32347 commit 94a4857
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/Wf.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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
Expand Down

0 comments on commit 94a4857

Please sign in to comment.