Running ‘testthat.R’ [118s/198s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > ops <- options("crayon.enabled" = FALSE)
  > library(testthat)
  > require("covr")
  Loading required package: covr
  > 
  > test_check("FRK")
  Loading required package: FRK
  Binned data in 0.164 seconds
  Binned data in 0.026 seconds
  Normalising basis function evaluations at BAU level...
  Binning data...
  Binned data in 0.077 seconds
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |=======================                                               |  33%
    |                                                                            
    |===============================================                       |  67%
    |                                                                            
    |======================================================================| 100%
  Maximum EM iterations reached
  Intercept 
  0.1860381 
  Formula: z ~ 1 
  Assumed response distribution: gaussian 
  Specified link function: identity 
  Method of model fitting: EM 
  Number of datasets: 1 
  Number of basis functions: 18 
  Class of basis functions: Basis 
  Number of BAUs [extract using object@BAUs]:  134 
  Number of observations [extract using object@Z]:  50 
  Mean obs. variance at BAU level [extract using object@Ve]: 0.01 
  Fine-scale variance proportionality constant [extract using object@sigma2fshat]: 0.1211177 
  Dimensions of C in Z = C*Y + e [extract using object@Cmat]:  c(50L, 134L) 
  Dimensions of S in Y = X*alpha + S*eta + delta [extract using object@S]:  c(50L, 18L) 
  Number of covariates: 1 
  
  Formula: z ~ 1 
  Assumed response distribution: gaussian 
  Specified link function: identity 
  Method of model fitting: EM 
  Number of datasets: 1 
  Number of basis functions: 18 
  Class of basis functions: Basis 
  Number of BAUs [extract using object@BAUs]:  134 
  Number of observations [extract using object@Z]:  50 
  Mean obs. variance at BAU level [extract using object@Ve]: 0.01 
  Fine-scale variance proportionality constant [extract using object@sigma2fshat]: 0.1211177 
  Dimensions of C in Z = C*Y + e [extract using object@Cmat]:  c(50L, 134L) 
  Dimensions of S in Y = X*alpha + S*eta + delta [extract using object@S]:  c(50L, 18L) 
  Number of covariates: 1 
  
  Normalising basis function evaluations at BAU level...
  Binning data...
  Binned data in 0.089 seconds
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |=======================                                               |  33%
    |                                                                            
    |===============================================                       |  67%
    |                                                                            
    |======================================================================| 100%
  Maximum EM iterations reached
  Averaging over polygons...
  Normalising basis function evaluations at BAU level...
  Binning data...
  Binned data in 0.259 seconds
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |=======================                                               |  33%
    |                                                                            
    |===============================================                       |  67%
    |                                                                            
    |======================================================================| 100%
  Maximum EM iterations reached
  Averaging over polygons...
  Normalising basis function evaluations at BAU level...
  Binning data...
  Binned data in 0.098 seconds
  Binned data in 0.095 seconds
  Binned data in 0.128 seconds
  Binned data in 0.135 seconds
  Binned data in 0.136 seconds
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |=======================                                               |  33%
    |                                                                            
    |===============================================                       |  67%
    |                                                                            
    |======================================================================| 100%
  Maximum EM iterations reached
  [1] "Entering test_basis.R"
  Number of basis functions: 50 
  Number of resolutions: 1 
  Regular: 0 
  Type of manifold: surface of sphere 
  Dimension of manifold: 2 
  First basis function:
   function (s)  {     stopifnot(ncol(s) == dimensions(manifold))     dist_sq <- distance(manifold, s, mu)^2     exp(-0.5 * dist_sq/(std^2)) } 
  Number of basis functions: 50 
  Number of resolutions: 1 
  Regular: 0 
  Type of manifold: surface of sphere 
  Dimension of manifold: 2 
  First basis function:
   function (s)  {     stopifnot(ncol(s) == dimensions(manifold))     dist_sq <- distance(manifold, s, mu)^2     exp(-0.5 * dist_sq/(std^2)) } 
  Averaging over polygons...
  First set of basis functions
  ----------------------------
  Number of basis functions: 10 
  Number of resolutions: 1 
  Regular: 0 
  Type of manifold: surface of sphere 
  Dimension of manifold: 2 
  First basis function:
   function (s)  {     stopifnot(ncol(s) == dimensions(manifold))     y <- distance(manifold, s, c)     (1 - (y/R)^2)^2 * (y < R) } 
  
  
  Second set of basis functions
  -----------------------------
  Number of basis functions: 3 
  Number of resolutions: 1 
  Regular: 0 
  Type of manifold: real_line 
  Dimension of manifold: 1 
  First basis function:
   function (s)  {     stopifnot(ncol(s) == dimensions(manifold))     y <- distance(manifold, s, c)     (1 - (y/R)^2)^2 * (y < R) } 
  
  
  Total number of basis functions: 30 
  Regular: FALSE 
  First set of basis functions
  ----------------------------
  Number of basis functions: 10 
  Number of resolutions: 1 
  Regular: 0 
  Type of manifold: surface of sphere 
  Dimension of manifold: 2 
  First basis function:
   function (s)  {     stopifnot(ncol(s) == dimensions(manifold))     y <- distance(manifold, s, c)     (1 - (y/R)^2)^2 * (y < R) } 
  
  
  Second set of basis functions
  -----------------------------
  Number of basis functions: 3 
  Number of resolutions: 1 
  Regular: 0 
  Type of manifold: real_line 
  Dimension of manifold: 1 
  First basis function:
   function (s)  {     stopifnot(ncol(s) == dimensions(manifold))     y <- distance(manifold, s, c)     (1 - (y/R)^2)^2 * (y < R) } 
  
  
  Total number of basis functions: 30 
  Regular: FALSE 
  [1] "Entering test_domains.R"
  Type of manifold: surface of sphere 
  Radius of sphere: 6371 
  Dimension of manifold: 2 
  Distance function:
   function (x1, x2 = NULL)  dist_sphere(x1, x2, R = R) 
  Type of manifold: surface of sphere 
  Radius of sphere: 6371 
  Dimension of manifold: 2 
  Distance function:
   function (x1, x2 = NULL)  dist_sphere(x1, x2, R = R) 
  Type of manifold: plane 
  Dimension of manifold: 2 
  Distance function:
   function (x1, x2)  distR(x1, x2) 
  Type of manifold: plane 
  Dimension of manifold: 2 
  Distance function:
   function (x1, x2)  distR(x1, x2) 
  Type of manifold: real_line 
  Dimension of manifold: 1 
  Distance function:
   function (x1, x2)  distR(x1, x2) 
  Type of manifold: real_line 
  Dimension of manifold: 1 
  Distance function:
   function (x1, x2)  distR(x1, x2) 
  Type of manifold: STplane 
  Dimension of manifold: 3 
  Distance function:
   function (x1, x2)  distR(x1, x2) 
  Type of manifold: STplane 
  Dimension of manifold: 3 
  Distance function:
   function (x1, x2)  distR(x1, x2) 
  Type of manifold: STplane 
  Dimension of manifold: 3 
  Distance function:
   function (x1, x2)  distR(x1, x2) 
  Type of manifold: STplane 
  Dimension of manifold: 3 
  Distance function:
   function (x1, x2)  distR(x1, x2) 
  Fitting variogram for estimating measurement error...
  Averaging over polygons...
  Normalising basis function evaluations at BAU level...
  Binning data...
  Binned data in 0.107 seconds
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |=======                                                               |  10%
    |                                                                            
    |==============                                                        |  20%
    |                                                                            
    |=====================                                                 |  30%
    |                                                                            
    |============================                                          |  40%
    |                                                                            
    |===================================                                   |  50%
    |                                                                            
    |==========================================                            |  60%
    |                                                                            
    |=================================================                     |  70%
    |                                                                            
    |========================================================              |  80%Minimum tolerance reached
  
  Constructing BAUs...
  Generating basis functions...
  Automatically choosing number of functions...
  Modelling using 819 basis functions.
  Constructing SRE model...
  Normalising basis function evaluations at BAU level...
  Fitting variogram for estimating measurement error...
  Binning data...
  Binned data in 0.543 seconds
  Fitting SRE model...
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |===================================                                   |  50%
    |                                                                            
    |======================================================================| 100%
  Maximum EM iterations reached
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test_BAUs.R:36:9): plane_BAUs ────────────────────────────────────────
  Error in `homogenise.segm.input(x, TRUE, crs = crs)`: Segment info matrix must be numeric or integer.
  Backtrace:
       █
    1. └─FRK::auto_BAUs(...) test_BAUs.R:36:8
    2.   ├─FRK:::auto_BAU(...)
    3.   └─FRK:::auto_BAU(...)
    4.     └─FRK:::.find_hull(coords, nonconvex_hull = nonconvex_hull, convex = convex)
    5.       └─INLA::inla.nonconvex.hull(coords, convex = convex)
    6.         └─INLA::inla.contour.segment(...)
    7.           └─INLA::inla.mesh.create(...)
    8.             ├─INLA:::system.time(...)
    9.             └─INLA:::inla.mesh.parse.segm.input(...)
   10.               └─base::lapply(...)
   11.                 └─INLA:::FUN(X[[i]], ...)
   12.                   └─INLA:::homogenise.segm.input(x, TRUE, crs = crs)
  ── Error (test_BAUs.R:142:9): SpaceTime_BAUs ───────────────────────────────────
  Error in `homogenise.segm.input(x, TRUE, crs = crs)`: Segment info matrix must be numeric or integer.
  Backtrace:
       █
    1. └─FRK::auto_BAUs(...) test_BAUs.R:142:8
    2.   ├─FRK:::auto_BAU(...)
    3.   └─FRK:::auto_BAU(...)
    4.     └─FRK:::.local(...)
    5.       ├─FRK:::auto_BAU(...)
    6.       └─FRK:::auto_BAU(...)
    7.         └─FRK:::.find_hull(coords, nonconvex_hull = nonconvex_hull, convex = convex)
    8.           └─INLA::inla.nonconvex.hull(coords, convex = convex)
    9.             └─INLA::inla.contour.segment(...)
   10.               └─INLA::inla.mesh.create(...)
   11.                 ├─INLA:::system.time(...)
   12.                 └─INLA:::inla.mesh.parse.segm.input(...)
   13.                   └─base::lapply(...)
   14.                     └─INLA:::FUN(X[[i]], ...)
   15.                       └─INLA:::homogenise.segm.input(x, TRUE, crs = crs)
  
  [ FAIL 2 | WARN 21 | SKIP 0 | PASS 188 ]
  Error: Test failures
  Execution halted