Running ‘testthat.R’ [11s/25s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library('testthat')
  > library('rdefra')
  > 
  > test_check('rdefra')
  1. Error: Up-to-date metadata catalogue should have at least 6569 stations. (@test-metadata.R#37) 
  No metadata available for the specified query
  1: ukair_catalogue() at testthat/test-metadata.R:37
  2: stop("No metadata available for the specified query")
  
  2. Failure: Find site identification number from the UK AIR ID string. (@test-metadata.R#50) 
  x == "ABD" not equal to TRUE.
  'is.NA' value mismatch: 0 in current 1 in target
  
  
  3. Error: Find easting and northing coordinates of site UKA12536. (@test-metadata.R#62) 
  subscript out of bounds
  1: ukair_get_coordinates(uka_id) at testthat/test-metadata.R:62
  2: ukair_get_coordinates.character(uka_id)
  3: id2coords(ids)
  4: data.frame(t(sapply(IDs, ukair_get_coordinates_internal)))
  5: t(sapply(IDs, ukair_get_coordinates_internal))
  6: sapply(IDs, ukair_get_coordinates_internal)
  7: lapply(X = X, FUN = FUN, ...)
  8: FUN(X[[i]], ...)
  
  4. Error: Find easting and northing coordinates of site UKA15910. (@test-metadata.R#77) 
  subscript out of bounds
  1: ukair_get_coordinates(uka_id) at testthat/test-metadata.R:77
  2: ukair_get_coordinates.character(uka_id)
  3: id2coords(ids)
  4: data.frame(t(sapply(IDs, ukair_get_coordinates_internal)))
  5: t(sapply(IDs, ukair_get_coordinates_internal))
  6: sapply(IDs, ukair_get_coordinates_internal)
  7: lapply(X = X, FUN = FUN, ...)
  8: FUN(X[[i]], ...)
  
  5. Error: Find easting and northing coordinates of multiple sites. (@test-metadata.R#91) 
  subscript out of bounds
  1: ukair_get_coordinates(IDs) at testthat/test-metadata.R:91
  2: ukair_get_coordinates.character(IDs)
  3: id2coords(ids)
  4: data.frame(t(sapply(IDs, ukair_get_coordinates_internal)))
  5: t(sapply(IDs, ukair_get_coordinates_internal))
  6: sapply(IDs, ukair_get_coordinates_internal)
  7: lapply(X = X, FUN = FUN, ...)
  8: FUN(X[[i]], ...)
  
  6. Error: Infill missing coordinates from data frame. (@test-metadata.R#108) ---
  No metadata available for the specified query
  1: ukair_catalogue() at testthat/test-metadata.R:108
  2: stop("No metadata available for the specified query")
  
  testthat results ================================================================
  OK: 8 SKIPPED: 1 FAILED: 6
  1. Error: Up-to-date metadata catalogue should have at least 6569 stations. (@test-metadata.R#37) 
  2. Failure: Find site identification number from the UK AIR ID string. (@test-metadata.R#50) 
  3. Error: Find easting and northing coordinates of site UKA12536. (@test-metadata.R#62) 
  4. Error: Find easting and northing coordinates of site UKA15910. (@test-metadata.R#77) 
  5. Error: Find easting and northing coordinates of multiple sites. (@test-metadata.R#91) 
  6. Error: Infill missing coordinates from data frame. (@test-metadata.R#108) 
  
  Error: testthat unit tests failed
  Execution halted