Running ‘testthat.R’ [74s/101s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(geofacet)
  Registered S3 method overwritten by 'geofacet':
    method from   
    +.gg   ggplot2
  > 
  > test_check("geofacet")
  ── 1. Error: auto examples work (@test-auto.R#5)  ──────────────────────────────
  Failed to install the rnaturalearthhires package.
    Please try installing the package for yourself using the following command: 
       install.packages("rnaturalearthhires", repos = "http://packages.ropensci.org", type = "source")
  1: grid_auto("brazil", seed = 1234) at testthat/test-auto.R:5
  2: get_ne_data(x)
  3: do.call(rnaturalearth::ne_states, pars)
  4: (function (country = NULL, geounit = NULL, iso_a2 = NULL, spdf = NULL, returnclass = c("sp", 
         "sf")) 
     {
         returnclass <- match.arg(returnclass)
         if (is.null(spdf)) {
             check_rnaturalearthhires()
             spdf <- rnaturalearthhires::states10
         }
         filter <- TRUE
         if (!is.null(country)) {
             if (!("admin" %in% names(spdf))) 
                 stop("No admin field in the data : ", names(spdf))
             filter_country <- tolower(spdf$admin) %in% tolower(country)
             filter <- filter & filter_country
             if (sum(filter_country) == 0) 
                 stop("No such country (", country, ") in the data")
         }
         if (!is.null(geounit)) {
             if (!("geonunit" %in% names(spdf))) 
                 stop("No geonunit field in the data : ", names(spdf))
             filter_geounit <- tolower(spdf$geonunit) %in% tolower(geounit)
             filter <- filter & filter_geounit
             if (sum(filter_geounit) == 0) 
                 stop("No such geounit (", geounit, ") in the data")
         }
         if (!is.null(iso_a2)) {
             if (!("iso_a2" %in% names(spdf))) 
                 stop("No iso_a2 field in the data : ", names(spdf))
             filter_iso_a2 <- tolower(spdf$iso_a2) %in% tolower(iso_a2)
             filter <- filter & filter_iso_a2
             if (sum(filter_iso_a2) == 0) 
                 stop("No such iso_a2 (", iso_a2, ") in the data")
         }
         ne_as_sf(spdf[filter, ], returnclass)
     })(country = "brazil")
  5: check_rnaturalearthhires()
  6: install_rnaturalearthhires()
  7: tryCatch(utils::install.packages("rnaturalearthhires", repos = "http://packages.ropensci.org", 
         type = "source"), error = error_func, warning = error_func)
  8: tryCatchList(expr, classes, parentenv, handlers)
  9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], 
         parentenv, handlers[[nh]])
  10: value[[3L]](cond)
  11: stop(paste("Failed to install the rnaturalearthhires package.\n", instructions))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 340 SKIPPED: 1 FAILED: 1
  1. Error: auto examples work (@test-auto.R#5) 
  
  Error: testthat unit tests failed
  Execution halted