From e4ae5688af8939d9460fe0465e41616bc5e73a11 Mon Sep 17 00:00:00 2001 From: Brett M Date: Wed, 20 Dec 2023 10:52:51 -0700 Subject: [PATCH] Update fwiRaster example to function correctly. --- R/fwiRaster.r | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/R/fwiRaster.r b/R/fwiRaster.r index 551a21a..325ec4e 100644 --- a/R/fwiRaster.r +++ b/R/fwiRaster.r @@ -128,10 +128,10 @@ #' require(terra) #' # The test data is a stack with four input variables including #' # daily noon temp, rh, ws, and prec (we recommend tif format): -#' day01 <- rast( +#' day01src <- rast( #' system.file("extdata", "test_rast_day01.tif", package = "cffdrs") #' ) -#' day01 <- crop(day01, c(250, 255, 47, 51)) +#' day01 <- crop(day01src, c(250, 255, 47, 51)) #' # assign variable names: #' names(day01) <- c("temp", "rh", "ws", "prec") #' # (1) use the initial values @@ -139,8 +139,9 @@ #' plot(foo) #' ### Additional, longer running examples ### #' # (2) use initial values with larger raster -#' day01 <- rast(day01src) +#' day01 <- day01src #' names(day01) <- c("temp", "rh", "ws", "prec") + #' \donttest{ #' foo <- fwiRaster(day01) #' }