Running ‘testthat.R’ [6s/29s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library("testthat")
  > library("rdefra")
  > 
  > test_check("rdefra")
  Error in read.table(file = file, header = header, sep = sep, quote = quote,  : 
    more columns than column names
  ── 1. Error: Metadata should be in the right format (@test-data.R#39)  ─────────
  arguments imply differing number of rows: 0, 1
  1: ukair_get_hourly_data(site_id, years) at testthat/test-data.R:39
  2: ukair_get_hourly_data_internal(site_id, myYear)
  3: data.frame(variable = names(df)[col_vars], unit = units_col, year = a_year, stringsAsFactors = FALSE)
  4: stop(gettextf("arguments imply differing number of rows: %s", paste(unique(nrows), 
         collapse = ", ")), domain = NA)
  
  ── 2. Error: Data should be in the right format (@test-data.R#53)  ─────────────
  arguments imply differing number of rows: 0, 1
  1: ukair_get_hourly_data(site_id, years) at testthat/test-data.R:53
  2: ukair_get_hourly_data_internal(site_id, myYear)
  3: data.frame(variable = names(df)[col_vars], unit = units_col, year = a_year, stringsAsFactors = FALSE)
  4: stop(gettextf("arguments imply differing number of rows: %s", paste(unique(nrows), 
         collapse = ", ")), domain = NA)
  
  ── 3. Error: Up-to-date metadata catalogue should have at least 6569 stations. (
  invalid multibyte string 1
  1: ukair_catalogue() at testthat/test-metadata.R:37
  2: utils::read.csv(catalogue_csv_link)
  3: read.table(file = file, header = header, sep = sep, quote = quote, dec = dec, fill = fill, 
         comment.char = comment.char, ...)
  4: make.names(col.names, unique = TRUE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 17 SKIPPED: 1 WARNINGS: 14 FAILED: 3
  1. Error: Metadata should be in the right format (@test-data.R#39) 
  2. Error: Data should be in the right format (@test-data.R#53) 
  3. Error: Up-to-date metadata catalogue should have at least 6569 stations. (@test-metadata.R#37) 
  
  Error: testthat unit tests failed
  Execution halted