regional demo: cache map data in proper R.cache dir
Change-Id: Ida19b35c36ca978797d043ba89ca1e359422cd2d
diff --git a/demo/regional.R b/demo/regional.R
index f056d58..5d62d78 100755
--- a/demo/regional.R
+++ b/demo/regional.R
@@ -3,9 +3,10 @@
library(ggplot2)
library(raster)
library(broom)
+library(R.cache)
devAskNewPage(ask = FALSE)
-mapfile <- "demo/data/cache/map-v2.rds"
+mapfile <- file.path(R.cache::getCachePath(), "map-v2.rds")
fetchAndPrepareMap <- function(map, pick) {
cat("Downloading GADM map data for ", map, "\n")