From c7fd347cc08a5af4aceebdc3bfc9760eb371403d Mon Sep 17 00:00:00 2001 From: chainsawriot Date: Thu, 16 May 2024 12:53:53 +0200 Subject: [PATCH] Add `trust` also for `import_list()` ref #406 --- R/import_list.R | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/R/import_list.R b/R/import_list.R index c58b6d4..72ed585 100644 --- a/R/import_list.R +++ b/R/import_list.R @@ -84,6 +84,13 @@ import_list <- function(file, setclass = getOption("rio.import.class", "data.fra file <- remote_to_local(file) } if (get_info(file)$format == "rdata") { + dots <- list(...) + if ("trust" %in% names(dots)) { + trust <- dots[["trust"]] + } else { + trust <- getOption("rio.import.trust", default = NULL) + } + .check_trust(trust, format = "RData") e <- new.env() load(file, envir = e) return(as.list(e))