From 254ab1803ed7306133e5a29f78b789adaaaf3afd Mon Sep 17 00:00:00 2001 From: Eliot McIntire Date: Mon, 22 Oct 2018 22:28:28 -0700 Subject: [PATCH] rename shpStudyRegionFull --> shpStudyAreaLarge --- Boreal_LBMRDataPrep.Rmd | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Boreal_LBMRDataPrep.Rmd b/Boreal_LBMRDataPrep.Rmd index 198ed27..fbdc60c 100644 --- a/Boreal_LBMRDataPrep.Rmd +++ b/Boreal_LBMRDataPrep.Rmd @@ -82,20 +82,20 @@ if (handDrawMap) { Plot(LIM_SA, addTo = "canadaMap", col = "green") ## hand-drawn study area - if(!exists("shpStudyRegionFull")) { - message("Since there is no object called 'shpStudyRegionFull', please draw a study area with 10 points") + if(!exists("shpStudyAreaLarge")) { + message("Since there is no object called 'shpStudyAreaLarge', please draw a study area with 10 points") severalrandompoints <- clickCoordinates(10) - if(startsWith(attr(severalrandompoints, "tags"), "cache")) message("Taking shpStudyRegionFull from Cache") - shpStudyRegionFull <- SpatialPolygons(list(Polygons(list(Polygon(severalrandompoints$coords)), ID = 1)), + if(startsWith(attr(severalrandompoints, "tags"), "cache")) message("Taking shpStudyAreaLarge from Cache") + shpStudyAreaLarge <- SpatialPolygons(list(Polygons(list(Polygon(severalrandompoints$coords)), ID = 1)), proj4string = crs(canadaMap)) } } -Plot(shpStudyRegionFull, addTo = "canadaMap", col = "red") +Plot(shpStudyAreaLarge, addTo = "canadaMap", col = "red") times <- list(start = 0, end = 10) modules <- list("Boreal_LBMRDataPrep") -objects <- if (handDrawMap) list("shpStudyRegionFull" = shpStudyRegionFull, - "shpStudySubRegion" = shpStudyRegionFull) else list() +objects <- if (handDrawMap) list("shpStudyAreaLarge" = shpStudyAreaLarge, + "shpStudySubRegion" = shpStudyAreaLarge) else list() mySim <- simInit(times = times, params = parameters, modules = modules, objects = objects) @@ -130,7 +130,7 @@ During the `simInit` call, if the user does not provide alternatives for the exp # Inputs This module has several input requirements. -One is a study area, which should be provided as a SpatialPolygonsDataFrame, and named `shpStudyRegionFull`. +One is a study area, which should be provided as a SpatialPolygonsDataFrame, and named `shpStudyAreaLarge`. This should be inside the boundaries of the boreal forest of Canada. When first running the code in this `.Rmd` file, you will be prompted to draw a polygon if none is provided as an input. @@ -152,8 +152,8 @@ ls(simOut) # Examine a few tables a visuals simOut$speciesTable Plot(simOut$biomassMap) -simOut$shpStudyRegionFull <- spTransform(simOut$shpStudyRegionFull, crs(simOut$biomassMap)) -Plot(simOut$shpStudyRegionFull, addTo = "simOut$biomassMap") +simOut$shpStudyAreaLarge <- spTransform(simOut$shpStudyAreaLarge, crs(simOut$biomassMap)) +Plot(simOut$shpStudyAreaLarge, addTo = "simOut$biomassMap") ``` # References