Running ‘testthat.R’ [7s/32s]
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)  ─────────
  input string 39 is invalid UTF-8
  1: ukair_get_hourly_data(site_id, years) at testthat/test-data.R:39
  2: ukair_get_hourly_data_internal(site_id, myYear)
  3: cbind(datetime = lubridate::dmy_hm(paste(df$Date, df$time, tz = "Europe/London")), 
         SiteID = site_id, df[, 3:dim(df)[2]])
  4: lubridate::dmy_hm(paste(df$Date, df$time, tz = "Europe/London"))
  5: .parse_xxx_hms(..., orders = "dmyR", quiet = quiet, tz = tz, locale = locale, truncated = truncated)
  6: parse_date_time(dates, orders, tz = tz, quiet = quiet, locale = locale)
  7: .local_parse(x[to_parse], TRUE)
  8: .local_parse(x)
  9: .best_formats(train, orders, locale = locale, select_formats, drop = drop)
  10: unique(guess_formats(x, orders, locale = locale, preproc_wday = TRUE))
  11: guess_formats(x, orders, locale = locale, preproc_wday = TRUE)
  12: gsub(reg$alpha_exact[["A"]], "%A", x, ignore.case = T, perl = T)
  
  ── 2. Error: Data should be in the right format (@test-data.R#53)  ─────────────
  input string 52 is invalid UTF-8
  1: ukair_get_hourly_data(site_id, years) at testthat/test-data.R:53
  2: ukair_get_hourly_data_internal(site_id, myYear)
  3: cbind(datetime = lubridate::dmy_hm(paste(df$Date, df$time, tz = "Europe/London")), 
         SiteID = site_id, df[, 3:dim(df)[2]])
  4: lubridate::dmy_hm(paste(df$Date, df$time, tz = "Europe/London"))
  5: .parse_xxx_hms(..., orders = "dmyR", quiet = quiet, tz = tz, locale = locale, truncated = truncated)
  6: parse_date_time(dates, orders, tz = tz, quiet = quiet, locale = locale)
  7: .local_parse(x[to_parse], TRUE)
  8: .local_parse(x)
  9: .best_formats(train, orders, locale = locale, select_formats, drop = drop)
  10: unique(guess_formats(x, orders, locale = locale, preproc_wday = TRUE))
  11: guess_formats(x, orders, locale = locale, preproc_wday = TRUE)
  12: gsub(reg$alpha_exact[["A"]], "%A", x, ignore.case = T, perl = T)
  
  ── 3. Error: Up-to-date metadata catalogue should have at least 6569 stations. (
  invalid multibyte string at '<b4><f0><d9><d9>'
  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: 19 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