From 507d06bf979709a1ddc842b53da23cd17aa20541 Mon Sep 17 00:00:00 2001 From: wlandau Date: Mon, 2 May 2022 10:45:04 -0400 Subject: [PATCH] Edit news and make tar_append_static_values() safer --- NEWS.md | 2 ++ R/tar_map_rep_raw.R | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 8f027cf6..d745e778 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,8 @@ # tarchetypes 0.6.0.9000 * Temporarily change `root.dir` when scanning for dependencies so `knitr` child documents work (#93, @mutlusun). +* Use `format = "rds"` for `target_batch` in `tar_map_rep_raw()` so the global format option does not mess up the pipeline. +* Handle non-atomic length-one list columns in `tar_append_static_values()`. # tarchetypes 0.6.0 diff --git a/R/tar_map_rep_raw.R b/R/tar_map_rep_raw.R index bf6ec7d9..2e4fe356 100644 --- a/R/tar_map_rep_raw.R +++ b/R/tar_map_rep_raw.R @@ -211,7 +211,7 @@ tar_append_static_values <- function(object, values) { args <- list(.data = object) for (name in setdiff(names(values), names(object))) { args[[name]] <- if_any( - length(values[[name]]) == 1L, + length(values[[name]]) == 1L && is.atomic(values[[name]]), values[[name]], list(values[[name]]) )