Skip to content

Commit 11e0eaf

Browse files
committed
lint
1 parent 2f58e38 commit 11e0eaf

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

R/create_summary_stats_and_stacks.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ create_summary_stats_and_stacks <- function(config_rds_file) {
3838
terra::values(raster_template) <- file$host_pools[[1]]$infected[[j]]
3939
raster_template
4040
})
41-
terra::writeRaster(terra::rast(y), file.path(config$output_path, paste0("pops_ensemble_ts_", j, ".tif")),
41+
terra::writeRaster(terra::rast(y),
42+
file.path(config$output_path, paste0("pops_ensemble_ts_", j, ".tif")),
4243
overwrite = TRUE, gdal = c("COMPRESS=NONE"))
4344
return(terra::rast(y))
4445
})

tests/testthat/test-pops.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ test_that("Test set 15: Pesticide treatments apply no matter what time step", {
499499
# only go through the day in which pesticide duration end doesn't go beyond the end_date
500500
for (i in 1:245) {
501501
config$treatment_dates <- c(paste(dates[[i]]))
502-
data <-pops(config)
502+
data <- pops(config)
503503
expect_equal(data$host_pools[[1]]$infected[[1]], matrix(0, ncol = 2, nrow = 2))
504504
expect_equal(data$host_pools[[1]]$susceptible[[1]],
505505
config$host_pools[[1]]$susceptible + config$host_pools[[1]]$infected)
@@ -509,7 +509,7 @@ test_that("Test set 15: Pesticide treatments apply no matter what time step", {
509509
config <- configuration(config_file = config_file, testing = TRUE)
510510
for (i in 1:245) {
511511
config$treatment_dates <- c(paste(dates[[i]]))
512-
data <-pops(config)
512+
data <- pops(config)
513513
expect_equal(data$host_pools[[1]]$infected[[1]], matrix(c(3, 0, 0, 0), ncol = 2, nrow = 2))
514514
expect_equal(data$host_pools[[1]]$susceptible[[1]],
515515
matrix(c(14, 14, 6, 15), ncol = 2, nrow = 2))

0 commit comments

Comments
 (0)