Skip to content

Commit

Permalink
Update fwiRaster example to function correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
BadgerOnABike committed Dec 20, 2023
1 parent 0ccb95f commit e4ae568
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/fwiRaster.r
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,20 @@
#' 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
#' foo <- fwiRaster(day01)
#' 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)
#' }
Expand Down

0 comments on commit e4ae568

Please sign in to comment.