Running ‘testthat.R’ [5s/35s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library("testthat")
  > library("rdefra")
  > 
  > test_check("rdefra")
  Error in type.convert.default(data[[i]], as.is = as.is[i], dec = dec,  : 
    invalid multibyte string at '<a0><cc>6'
  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 read.table(file = file, header = header, sep = sep, quote = quote,  : 
    more columns than column names
  Error in read.table(file = file, header = header, sep = sep, quote = quote,  : 
    more columns than column names
  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)
  
  Error in type.convert.default(data[[i]], as.is = as.is[i], dec = dec,  : 
    invalid multibyte string at '<be><d6><f3><e1><f6><30><dd><1c><61><e1><72><21><75><80><48><15><e7><ab><db><e8><3b><90><76><d5><b7><62><2a><a0><da><6f><5c><9c><4d><cd><76><ef><82><1a><a8><94><28><c2><be><26><84><17><28><c7><93><f9><88><7d><77><13><e4><b1><2a><07><9d><85><d1><af><e5><52><ea><b1><e1><5b><68><59><de><e4><c5><4e><6b><51><cf><3e><79><26><a6><e7><b1><23><e6><6a><7b><a4><a5><c0><68><8d><f3><21><93><9a>'
  ── 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 1059 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: 45 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