Running ‘testthat.R’ [59s/121s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > ##load your dependencies
  > library(testthat)
  > library(SDraw)
  Loading required package: sp
  SDraw - Sample Draws (v 2.1.13)
  > library(sp)
  > library(rgeos)
  rgeos version: 0.5-5, (SVN revision 640)
   GEOS runtime version: 3.9.0-CAPI-1.16.2 
   Linking to sp version: 1.4-4 
   Polygon checking: TRUE 
  
  > 
  > ##test your package
  > test_check('SDraw')
  
  Stratum: None 
  Current number of levels: 3 
  Current number of levels: 4 
  Final number of levels: 4 
  
  Stratum: None 
  Current number of levels: 3 
  Current number of levels: 4 
  Final number of levels: 4 
  
  Stratum: None 
  Current number of levels: 3 
  Current number of levels: 4 
  Final number of levels: 4 
  
  Stratum: None 
  Current number of levels: 1 
  Final number of levels: 1 
  
  Stratum: None 
  Current number of levels: 1 
  Final number of levels: 1 
  
  Stratum: None 
  Current number of levels: 4 
  Current number of levels: 6 
  Current number of levels: 7 
  Current number of levels: 8 
  Current number of levels: 9 
  Final number of levels: 9 
  
  Stratum: None 
  Current number of levels: 2 
  Final number of levels: 2 
  
  Stratum: None 
  Current number of levels: 1 
  Final number of levels: 1 
  
  Stratum: None 
  Current number of levels: 1 
  Final number of levels: 1 
  
  Stratum: None 
  Current number of levels: 2 
  Current number of levels: 3 
  Final number of levels: 3 
  
  Stratum: None 
  Current number of levels: 1 
  Final number of levels: 1 
  
  Stratum: None 
  Current number of levels: 1 
  Final number of levels: 1 
  
  Stratum: None 
  Current number of levels: 2 
  Current number of levels: 3 
  Current number of levels: 4 
  Final number of levels: 4 
  
  Stratum: None 
  Current number of levels: 1 
  Final number of levels: 1 
  
  Stratum: None 
  Current number of levels: 1 
  Final number of levels: 1 
  ══ Warnings ════════════════════════════════════════════════════════════════════
  ── Warning (test-extended.gcd.R:21:3): extended.gcd() operates appropriately ───
  the condition has length > 1 and only the first element will be used
  Backtrace:
   1. testthat::expect(...) test-extended.gcd.R:21:2
  ── Warning (test-extended.gcd.R:21:3): extended.gcd() operates appropriately ───
  the condition has length > 1 and only the first element will be used
  Backtrace:
   1. testthat::expect(...) test-extended.gcd.R:21:2
  ── Warning (test-grts.equi.R:25:3): grts.equi() operates appropriately ─────────
  GDAL Message 1: +init=epsg:XXXX syntax is deprecated. It might return a CRS with a non-EPSG compliant axis order.
  Backtrace:
    1. testthat::expect_type(obj <- grts.equi(spdf, 20, 0), "S4") test-grts.equi.R:25:2
    4. SDraw:::grts.equi(spdf, 20, 0)
    5. spsurvey::grts(...)
    7. sf:::st_as_sf.Spatial(sp.object)
    9. sf:::st_as_sfc.SpatialPoints(sp::geometry(x), ...)
   15. sf:::st_crs.CRS(x@proj4string)
   17. sf:::st_crs.character(x@projargs)
   18. sf:::make_crs(x)
   19. sf:::CPL_crs_from_input(x)
  ── Warning (test-grts.equi.R:25:3): grts.equi() operates appropriately ─────────
  A new CRS was assigned to an object with an existing CRS:
  +proj=sterea +lat_0=52.1561605555556 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs
  without reprojecting.
  For reprojection, use function spTransform
  Backtrace:
   1. testthat::expect_type(obj <- grts.equi(spdf, 20, 0), "S4") test-grts.equi.R:25:2
   4. SDraw:::grts.equi(spdf, 20, 0)
   6. sp::`proj4string<-`(`*tmp*`, value = CRS(proj4string(shp)))
  ── Warning (test-grts.equi.R:26:3): grts.equi() operates appropriately ─────────
  A new CRS was assigned to an object with an existing CRS:
  +proj=sterea +lat_0=52.1561605555556 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs
  without reprojecting.
  For reprojection, use function spTransform
  Backtrace:
   1. testthat::expect_visible(grts.equi(spdf, 20, 0), c("sampleID")) test-grts.equi.R:26:2
   3. SDraw:::grts.equi(spdf, 20, 0)
   5. sp::`proj4string<-`(`*tmp*`, value = CRS(proj4string(shp)))
  ── Warning (test-grts.equi.R:29:3): grts.equi() operates appropriately ─────────
  A new CRS was assigned to an object with an existing CRS:
  +proj=sterea +lat_0=52.1561605555556 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs
  without reprojecting.
  For reprojection, use function spTransform
  Backtrace:
   1. testthat::expect_named(...) test-grts.equi.R:29:2
   4. SDraw:::grts.equi(spdf, 15, 3)
   6. sp::`proj4string<-`(`*tmp*`, value = CRS(proj4string(shp)))
  ── Warning (test-grts.equi.R:44:3): grts.equi() operates appropriately ─────────
  A new CRS was assigned to an object with an existing CRS:
  +proj=sterea +lat_0=52.1561605555556 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs
  without reprojecting.
  For reprojection, use function spTransform
  Backtrace:
   1. testthat::expect_identical(...) test-grts.equi.R:44:2
   4. SDraw:::grts.equi(spdf, 1, 0)
   6. sp::`proj4string<-`(`*tmp*`, value = CRS(proj4string(shp)))
  ── Warning (test-grts.equi.R:45:3): grts.equi() operates appropriately ─────────
  A new CRS was assigned to an object with an existing CRS:
  +proj=sterea +lat_0=52.1561605555556 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs
  without reprojecting.
  For reprojection, use function spTransform
  Backtrace:
   1. testthat::expect_identical(...) test-grts.equi.R:45:2
   4. SDraw:::grts.equi(spdf, 1, 0)
   6. sp::`proj4string<-`(`*tmp*`, value = CRS(proj4string(shp)))
  ── Warning (test-grts.equi.R:49:3): grts.equi() operates appropriately ─────────
  
  Since the maximum value of total inclusion probability for the grid cells was 
  not changing, the algorithm for determining the number of levels for 
  hierarchical randomization was terminated.
  
  Backtrace:
   1. testthat::expect_error(grts.equi(spdf, 158, 0)) test-grts.equi.R:49:2
   6. SDraw:::grts.equi(spdf, 158, 0)
   7. spsurvey::grts(...)
   8. spsurvey::grtspts(...)
   9. spsurvey::numLevels(...)
  ── Warning (test-grts.equi.R:49:3): grts.equi() operates appropriately ─────────
  
  Of the 155 grid cells from which sample points were selected,
  3 (1.9%) of the cells contained more than one sample point.
  
  Backtrace:
   1. testthat::expect_error(grts.equi(spdf, 158, 0)) test-grts.equi.R:49:2
   6. SDraw:::grts.equi(spdf, 158, 0)
   7. spsurvey::grts(...)
   8. spsurvey::grtspts(...)
  ── Warning (test-grts.equi.R:49:3): grts.equi() operates appropriately ─────────
  
  The number of points to be selected from the cell with index value 127 exceeded the number of points in the cell.
  
  Backtrace:
   1. testthat::expect_error(grts.equi(spdf, 158, 0)) test-grts.equi.R:49:2
   6. SDraw:::grts.equi(spdf, 158, 0)
   7. spsurvey::grts(...)
   8. spsurvey::grtspts(...)
   9. spsurvey::pickFiniteSamplePoints(rdx, xc, yc, dx, dy, ptsframe)
  ── Warning (test-grts.equi.R:49:3): grts.equi() operates appropriately ─────────
  
  The number of points to be selected from the cell with index value 13 exceeded the number of points in the cell.
  
  Backtrace:
   1. testthat::expect_error(grts.equi(spdf, 158, 0)) test-grts.equi.R:49:2
   6. SDraw:::grts.equi(spdf, 158, 0)
   7. spsurvey::grts(...)
   8. spsurvey::grtspts(...)
   9. spsurvey::pickFiniteSamplePoints(rdx, xc, yc, dx, dy, ptsframe)
  ── Warning (test-grts.equi.R:49:3): grts.equi() operates appropriately ─────────
  
  The number of points to be selected from the cell with index value 62 exceeded the number of points in the cell.
  
  Backtrace:
   1. testthat::expect_error(grts.equi(spdf, 158, 0)) test-grts.equi.R:49:2
   6. SDraw:::grts.equi(spdf, 158, 0)
   7. spsurvey::grts(...)
   8. spsurvey::grtspts(...)
   9. spsurvey::pickFiniteSamplePoints(rdx, xc, yc, dx, dy, ptsframe)
  ── Warning (test-grts.equi.R:49:3): grts.equi() operates appropriately ─────────
  
  The size of the selected sample was less than the desired size for stratum
  "None".
  
  Backtrace:
   1. testthat::expect_error(grts.equi(spdf, 158, 0)) test-grts.equi.R:49:2
   6. SDraw:::grts.equi(spdf, 158, 0)
   7. spsurvey::grts(...)
  ── Warning (test-grts.equi.R:49:3): grts.equi() operates appropriately ─────────
  A new CRS was assigned to an object with an existing CRS:
  +proj=sterea +lat_0=52.1561605555556 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs
  without reprojecting.
  For reprojection, use function spTransform
  Backtrace:
   1. testthat::expect_error(grts.equi(spdf, 158, 0)) test-grts.equi.R:49:2
   6. SDraw:::grts.equi(spdf, 158, 0)
   8. sp::`proj4string<-`(`*tmp*`, value = CRS(proj4string(shp)))
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-bas.point.R:17:1): (code run outside of `test_that()`) ──────────
  Error: nr == length(x) is not TRUE
  Backtrace:
      █
   1. └─SDraw::bas.point(spdf, 20) test-bas.point.R:17:0
   2.   └─SDraw::bas.polygon(pixels, round(n.iter * (1 + n.iter/N)))
   3.     ├─sp::over(halt.pts, x)
   4.     └─sp::over(halt.pts, x)
   5.       └─sp:::.local(x, y, returnList, fn, ...)
   6.         ├─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   7.         └─sp::over(x, geometry(y), returnList = TRUE, minDimension = minDimension)
   8.           └─sp:::.invert(r, length(y), length(x))
   9.             └─base::stopifnot(nr == length(x))
  
  [ FAIL 1 | WARN 15 | SKIP 0 | PASS 63 ]
  Error: Test failures
  Execution halted