-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-models.R
More file actions
34 lines (27 loc) · 814 Bytes
/
test-models.R
File metadata and controls
34 lines (27 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
context("Model checking")
test_that("OMs run", {
skip_on_cran()
f <- system.file("models", package = "ss3models")
models <- list.files(f)
output <- lapply(models, function(x)
check_model(file.path(f, x, "om"), opts = "-noest"))
})
# test_that("EMs run", {
# skip_on_cran()
#
# f <- system.file("models", package = "ss3models")
# models <- list.files(f)
#
# output <- lapply(models, function(x)
# check_model(file.path(f, x, "em"), ss_mode = "opt"))
# })
test_that("OM .dat files pass ss3sim checks", {
skip_on_cran()
f <- system.file("models", package = "ss3models")
models <- list.files(f)
output <- lapply(models, function(x) {
message(paste("Checking", x))
d <- r4ss::SS_readdat(file.path(f, x, "om", "ss3.dat"), verbose = FALSE)
ss3sim::check_data(d)
})
})