Running 'testthat.R' [25m]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library("testthat")
  > library("rdefra")
  > 
  > test_check("rdefra")
  -- 1. Failure: Hourly data for station ABD/2014 should be available (@test-data.
  `x` not equal to `expected`.
  1 element mismatch
  
  Error in file(file, "rt") : cannot open the connection
  Error in file(file, "rt") : cannot open the connection
  Error in file(file, "rt") : cannot open the connection
  Error in file(file, "rt") : cannot open the connection
  Error in file(file, "rt") : cannot open the connection
  Error in file(file, "rt") : cannot open the connection
  Error in file(file, "rt") : cannot open the connection
  Error in file(file, "rt") : cannot open the connection
  Error in file(file, "rt") : cannot open the connection
  Error in file(file, "rt") : cannot open the connection
  Error in file(file, "rt") : cannot open the connection
  Error in file(file, "rt") : cannot open the connection
  Error in file(file, "rt") : cannot open the connection
  Error in file(file, "rt") : cannot open the connection
  Error in file(file, "rt") : cannot open the connection
  -- 2. Failure: Metadata should be in the right format (@test-data.R#44)  -------
  `x` not equal to `expected`.
  1 element mismatch
  
  Error in file(file, "rt") : cannot open the connection
  -- 3. Failure: Data should be in the right format (@test-data.R#55)  -----------
  `x` not equal to `expected`.
  'is.NA' value mismatch: 0 in current 1 in target
  
  -- 4. Failure: DEFRA server should be running (@test-metadata.R#29)  -----------
  `x` not equal to `expected`.
  1 element mismatch
  
  -- 5. Error: Up-to-date metadata catalogue should have at least 6569 stations. (
  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")
  
  -- 6. Failure: Find site identification number from the UK AIR ID string. (@test
  `x` not equal to `expected`.
  'is.NA' value mismatch: 0 in current 1 in target
  
  -- 7. Error: Find easting and northing coordinates of site UKA12536. (@test-meta
  subscript out of bounds
  1: ukair_get_coords(uka_id) at testthat/test-metadata.R:62
  2: ukair_get_coords.character(uka_id)
  3: id2coords(ids)
  4: data.frame(t(sapply(id_s, ukair_get_coords_internal)))
  5: t(sapply(id_s, ukair_get_coords_internal))
  6: sapply(id_s, ukair_get_coords_internal)
  7: lapply(X = X, FUN = FUN, ...)
  8: FUN(X[[i]], ...)
  
  -- 8. Error: Find easting and northing coordinates of site UKA15910. (@test-meta
  subscript out of bounds
  1: ukair_get_coords(uka_id) at testthat/test-metadata.R:77
  2: ukair_get_coords.character(uka_id)
  3: id2coords(ids)
  4: data.frame(t(sapply(id_s, ukair_get_coords_internal)))
  5: t(sapply(id_s, ukair_get_coords_internal))
  6: sapply(id_s, ukair_get_coords_internal)
  7: lapply(X = X, FUN = FUN, ...)
  8: FUN(X[[i]], ...)
  
  -- 9. Error: Find easting and northing coordinates of multiple sites. (@test-met
  subscript out of bounds
  1: ukair_get_coords(IDs) at testthat/test-metadata.R:91
  2: ukair_get_coords.character(IDs)
  3: id2coords(ids)
  4: data.frame(t(sapply(id_s, ukair_get_coords_internal)))
  5: t(sapply(id_s, ukair_get_coords_internal))
  6: sapply(id_s, ukair_get_coords_internal)
  7: lapply(X = X, FUN = FUN, ...)
  8: FUN(X[[i]], ...)
  
  -- 10. Error: Infill missing coordinates from data frame. (@test-metadata.R#121)
  subscript out of bounds
  1: ukair_get_coords(stations) at testthat/test-metadata.R:121
  2: ukair_get_coords.data.frame(stations)
  3: id2coords(id_s)
  4: data.frame(t(sapply(id_s, ukair_get_coords_internal)))
  5: t(sapply(id_s, ukair_get_coords_internal))
  6: sapply(id_s, ukair_get_coords_internal)
  7: lapply(X = X, FUN = FUN, ...)
  8: FUN(X[[i]], ...)
  
  == testthat results  ===========================================================
  OK: 24 SKIPPED: 1 FAILED: 10
  1.  Failure: Hourly data for station ABD/2014 should be available (@test-data.R#11) 
  2.  Failure: Metadata should be in the right format (@test-data.R#44) 
  3.  Failure: Data should be in the right format (@test-data.R#55) 
  4.  Failure: DEFRA server should be running (@test-metadata.R#29) 
  5.  Error: Up-to-date metadata catalogue should have at least 6569 stations. (@test-metadata.R#37) 
  6.  Failure: Find site identification number from the UK AIR ID string. (@test-metadata.R#50) 
  7.  Error: Find easting and northing coordinates of site UKA12536. (@test-metadata.R#62) 
  8.  Error: Find easting and northing coordinates of site UKA15910. (@test-metadata.R#77) 
  9.  Error: Find easting and northing coordinates of multiple sites. (@test-metadata.R#91) 
  10. Error: Infill missing coordinates from data frame. (@test-metadata.R#121) 
  
  Error: testthat unit tests failed
  Execution halted