Running ‘testthat.R’ [6s/36s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library("testthat")
  > library("rdefra")
  > 
  > test_check("rdefra")
  Error in make.names(col.names, unique = TRUE) : 
    invalid multibyte string at '<cb>[3<ee><a8><88>o<d8><c6>yF<81>ݤj<ab>ËS<99>1%<d3><f1><d4>/<86><8c><f3><92><95><d5>XU<c4>F<c0><dd>G<b0>7<aa>}<d4><eb>G<Ef<d9><e5>M<af><86><aa>opǦ6<f7><f8><83>z<b1><f7>X<a8><f2>~<eb>:'
  Error in make.names(col.names, unique = TRUE) : 
    invalid multibyte string at '<d3><d6>(<b9>A<2d><ad><c5><d6>0S<8f><bf>tw<82><f2><94><d6>3J<db><c0>r<b8><f2>Cq<b9><b0>Gc<a9>'U<e3>R}<fc>12<b1><8e> <c2><fc><be>h`<<9b>I<a9>q<82>6<d5><e5><b1>w'
  Error in make.names(col.names, unique = TRUE) : 
    invalid multibyte string 1
  Error in make.names(col.names, unique = TRUE) : 
    invalid multibyte string 1
  Error in make.names(col.names, unique = TRUE) : 
    invalid multibyte string 1
  Error in make.names(col.names, unique = TRUE) : 
    invalid multibyte string 1
  ── 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)
  
  Error in read.table(file = file, header = header, sep = sep, quote = quote,  : 
    more columns than column names
  ── 2. 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
  
  ── 3. Error: Up-to-date metadata catalogue should have at least 6569 stations. (
  input string 4663 is invalid UTF-8
  1: ukair_catalogue() at testthat/test-metadata.R:37
  2: data.frame(apply(df, 2, function(x) trimws(x)), stringsAsFactors = FALSE)
  3: apply(df, 2, function(x) trimws(x))
  4: FUN(newX[, i], ...)
  5: trimws(x)
  6: mysub(paste0(whitespace, "+$"), mysub(paste0("^", whitespace, "+"), x))
  7: sub(re, "", x, perl = TRUE)
  8: mysub(paste0("^", whitespace, "+"), x)
  9: sub(re, "", x, perl = TRUE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 17 SKIPPED: 1 WARNINGS: 40 FAILED: 3
  1. Error: Metadata should be in the right format (@test-data.R#39) 
  2. Failure: Data should be in the right format (@test-data.R#55) 
  3. Error: Up-to-date metadata catalogue should have at least 6569 stations. (@test-metadata.R#37) 
  
  Error: testthat unit tests failed
  Execution halted