From 0eb411ee2d9aef27d96567b5c17187b3641cc4d8 Mon Sep 17 00:00:00 2001 From: Cole Brokamp Date: Fri, 2 Feb 2024 10:26:27 -0500 Subject: [PATCH] fix write error if R user dir for appc does not exist --- R/helper.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/helper.R b/R/helper.R index 6c814e5..b3040af 100644 --- a/R/helper.R +++ b/R/helper.R @@ -1,3 +1,7 @@ +.onLoad <- function(...) { + dir.create(tools::R_user_dir("appc", "data"), recursive = TRUE, showWarnings=FALSE) +} + #' Get the geography of the 2020 contiguous United States #' @return s2_geography object #' @export