From 42013dbe8310931b1f7373a7338101146f0cea8b Mon Sep 17 00:00:00 2001 From: Eliot McIntire Date: Mon, 29 Oct 2018 17:52:26 -0400 Subject: [PATCH] Boreal_LBMRDataPrep.Rmd bugfixes for stand alone --- Boreal_LBMRDataPrep.Rmd | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Boreal_LBMRDataPrep.Rmd b/Boreal_LBMRDataPrep.Rmd index 68ff1ba..c068888 100644 --- a/Boreal_LBMRDataPrep.Rmd +++ b/Boreal_LBMRDataPrep.Rmd @@ -62,11 +62,10 @@ paths <- getPaths() ```{r get-study-area} library(raster) -cachePath <- file.path("Boreal_LBMRDataPrep", "cache") -modulePath <- Cache(readline, paste0("Where is the module path? (e.g., ~/module, with no quotes).\n", - "Press Enter to accept the path in getPaths()$modulePath: "), - cacheRepo = cachePath) -setPaths(cachePath = cachePath, modulePath = modulePath) +# modulePath <- Cache(readline, paste0("Where is the module path? (e.g., ~/module, with no quotes).\n", +# "Press Enter to accept the path in getPaths()$modulePath: "), +# cacheRepo = cachePath) +# setPaths(cachePath = cachePath, modulePath = modulePath) ## do you want to hand-draw a map or use defaults? # - note that large areas will take longer to compute @@ -89,16 +88,17 @@ if (handDrawMap) { shpStudyAreaLarge <- SpatialPolygons(list(Polygons(list(Polygon(severalrandompoints$coords)), ID = 1)), proj4string = crs(canadaMap)) } + Plot(shpStudyAreaLarge, addTo = "canadaMap", col = "red") } -Plot(shpStudyAreaLarge, addTo = "canadaMap", col = "red") times <- list(start = 0, end = 10) modules <- list("Boreal_LBMRDataPrep") objects <- if (handDrawMap) list("shpStudyAreaLarge" = shpStudyAreaLarge, "shpStudyArea" = shpStudyAreaLarge) else list() -mySim <- simInit(times = times, params = parameters, modules = modules, - objects = objects) +mySim <- simInit(times = times, #params = parameters, + modules = append(modules, "LBMR"), + objects = objects, paths = getPaths()) ``` # Run `spades`