File: test_base_createSpatialResamplingPlots.R

package info (click to toggle)
r-cran-mlr 2.19.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,392 kB
  • sloc: ansic: 65; sh: 13; makefile: 5
file content (13 lines) | stat: -rwxr-xr-x 501 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
test_that("test createSpatialResamplingPlots() creates 10 ggplot objects", {

  # take more reps to see if the restriction on two reps works
  rdesc = makeResampleDesc("SpRepCV", folds = 5, reps = 3)
  r = resample(makeLearner("classif.qda"), spatial.task, rdesc)

  plots = createSpatialResamplingPlots(spatial.task, r, crs = 32717,
    repetitions = 2, x.axis.breaks = c(-79.065, -79.085),
    y.axis.breaks = c(-3.970, -4))

  expect_class(plots[[1]][[1]], "gg")
  expect_length(plots[[1]], 10)
})