From feb832352ba887e83d4abb9d85596cd4d7b11cb2 Mon Sep 17 00:00:00 2001 From: aureol-le-rocher <95870033+aureol-le-rocher@users.noreply.github.com> Date: Sun, 15 Mar 2026 19:34:10 +0000 Subject: [PATCH] resolve 'data_perm and template_data_geographics not found' error in download handler by loading dataset from package namespace --- R/server.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/server.R b/R/server.R index fa1e377..5332354 100644 --- a/R/server.R +++ b/R/server.R @@ -710,7 +710,8 @@ server <- function(input, output, session) { paste("template_geographic",Sys.Date(),".csv",sep = "") }, content = function(file){ - write.csv(template_data_geographics,file,row.names = FALSE) + x <- get("template_data_geographics", envir = asNamespace("rdcAVS")) + write.csv(x,file,row.names = FALSE) } ) @@ -1380,7 +1381,8 @@ observeEvent(input$download_geo,{ paste("template_permissions",Sys.Date(),".csv",sep = "") }, content = function(file){ - write.csv(data_perm,file,row.names = FALSE) + y <- get("data_perm", envir = asNamespace("rdcAVS")) + write.csv(y,file,row.names = FALSE) } )