Running ‘testthat.R’ [77s/126s]
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.083 seconds
  Binned data in 0.009 seconds
  Binned data in 0.087 seconds
  Binned data in 0.22 seconds
  Binned data in 0.222 seconds
  Binned data in 0.227 seconds
  Binned data in 0.226 seconds
  Binned data in 0.256 seconds
  Binned data in 0.036 seconds
  Binned data in 0.064 seconds
  Binned data in 0.068 seconds
  Binned data in 0.066 seconds
  Binned data in 0.068 seconds
  Binned data in 0.176 seconds
  Binned data in 0.106 seconds
  Binned data in 0.22 seconds
  Binned data in 0.234 seconds
  Binned data in 0.242 seconds
  Binned data in 0.059 seconds
  Binned data in 0.063 seconds
  Binned data in 0.066 seconds
  Binned data in 0.082 seconds
  Binned data in 0.065 seconds
  Normalising basis function evaluations at BAU level...
  Binning data...
  Binned data in 0.107 seconds
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |=======================                                               |  33%
    |                                                                            
    |===============================================                       |  67%
    |                                                                            
    |======================================================================| 100%
  Maximum EM iterations reached
  Intercept 
  0.3463571 
  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]:  135 
  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.08701594 
  Dimensions of C in Z = C*Y + e [extract using object@Cmat]:  c(50L, 135L) 
  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]:  135 
  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.08701594 
  Dimensions of C in Z = C*Y + e [extract using object@Cmat]:  c(50L, 135L) 
  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.091 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.176 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.126 seconds
  Binned data in 0.128 seconds
  Binned data in 0.132 seconds
  Binned data in 0.101 seconds
  Binned data in 0.077 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: 1 
  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: 1 
  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.093 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.654 seconds
  Fitting SRE model...
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |===================================                                   |  50%
    |                                                                            
    |======================================================================| 100%
  Maximum EM iterations reached
  [ FAIL 2 | WARN 23 | SKIP 0 | PASS 215 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test_SRE.R:48:5): SRE 1D works ─────────────────────────────────────
  as.numeric(grid_BAUs$newdata$var) not equal to diag(grid_BAUs$Cov).
  names for current but not for target
  ── Failure (test_SRE.R:51:5): SRE 1D works ─────────────────────────────────────
  as.numeric(grid_BAUs$newdata$var) not equal to diag(grid_BAUs$Cov).
  names for current but not for target
  
  [ FAIL 2 | WARN 23 | SKIP 0 | PASS 215 ]
  Error: Test failures
  Execution halted