Running ‘testthat.R’ [20s/365s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library("testthat")
  > library("rdefra")
  > 
  > test_check("rdefra")
  ── 1. Error: Find easting and northing coordinates of site UKA12536. (@test-meta
  is.character(proj) is not TRUE
  Backtrace:
    1. rdefra::ukair_get_coordinates(uka_id)
    2. rdefra:::ukair_get_coordinates.character(uka_id)
    3. rdefra:::en2latlon(df)
    5. sp::spTransform(df_no_nas, sp::CRS("+init=epsg:4326"))
    7. rgdal:::spTransform(xSP, CRSobj, ...)
    8. rgdal:::get_aoi(x)
    9. rgdal::project(t(bbox(obj))[, 1:2], tg, inv = TRUE, use_aoi = FALSE)
   10. base::stopifnot(is.character(proj))
  
  ── 2. Error: Find easting and northing coordinates of site UKA15910. (@test-meta
  is.character(proj) is not TRUE
  Backtrace:
    1. rdefra::ukair_get_coordinates(uka_id)
    2. rdefra:::ukair_get_coordinates.character(uka_id)
    3. rdefra:::en2latlon(df)
    5. sp::spTransform(df_no_nas, sp::CRS("+init=epsg:4326"))
    7. rgdal:::spTransform(xSP, CRSobj, ...)
    8. rgdal:::get_aoi(x)
    9. rgdal::project(t(bbox(obj))[, 1:2], tg, inv = TRUE, use_aoi = FALSE)
   10. base::stopifnot(is.character(proj))
  
  ── 3. Error: Find easting and northing coordinates of multiple sites. (@test-met
  is.character(proj) is not TRUE
  Backtrace:
    1. rdefra::ukair_get_coordinates(IDs)
    2. rdefra:::ukair_get_coordinates.character(IDs)
    3. rdefra:::en2latlon(df)
    5. sp::spTransform(df_no_nas, sp::CRS("+init=epsg:4326"))
    7. rgdal:::spTransform(xSP, CRSobj, ...)
    8. rgdal:::get_aoi(x)
    9. rgdal::project(t(bbox(obj))[, 1:2], tg, inv = TRUE, use_aoi = FALSE)
   10. base::stopifnot(is.character(proj))
  
  ── 4. Error: Infill missing coordinates from data frame. (@test-metadata.R#119) 
  is.character(proj) is not TRUE
  Backtrace:
    1. rdefra::ukair_get_coordinates(stations)
    2. rdefra:::ukair_get_coordinates.data.frame(stations)
    3. rdefra:::en2latlon(ids)
    5. sp::spTransform(df_no_nas, sp::CRS("+init=epsg:4326"))
    7. rgdal:::spTransform(xSP, CRSobj, ...)
    8. rgdal:::get_aoi(x)
    9. rgdal::project(t(bbox(obj))[, 1:2], tg, inv = TRUE, use_aoi = FALSE)
   10. base::stopifnot(is.character(proj))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 10 | SKIPPED: 1 | WARNINGS: 8 | FAILED: 4 ]
  1. Error: Find easting and northing coordinates of site UKA12536. (@test-metadata.R#62) 
  2. Error: Find easting and northing coordinates of site UKA15910. (@test-metadata.R#77) 
  3. Error: Find easting and northing coordinates of multiple sites. (@test-metadata.R#91) 
  4. Error: Infill missing coordinates from data frame. (@test-metadata.R#119) 
  
  Error: testthat unit tests failed
  Execution halted