Running ‘testthat.R’ [4s/29s]
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 '<c7><ג<b8><3e><a2>t<90>j<b0>ն<dc><d9><de>ךIX:nA<b8>r<ad><a7>#HyW<80>ʂRVv*-q<b0>pinLx<80><a1><92><c0><8b><b4><9f>PUB<d3><fd><c4><dd>\c<ce>9<d1><ee>L6<f4><d4>lL<de><fe><ff><e6>3<d2>Ô<eb><b9>u<a9><ce>5<ac>yL<fc>C|<b4>6<8d>?<df>Ch<f2><86>m<96><f4><b1>Gd<f6><c8><c8><c3>'
  ── 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)  ─────────────
  format string is too long
  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: .best_formats(train, orders, locale = locale, select_formats, drop = drop)
  9: .train_formats(x, fmts, locale = locale)
  10: lapply(formats, function(fmt) .strptime(x, fmt, locale = locale))
  11: FUN(X[[i]], ...)
  12: .strptime(x, fmt, locale = locale)
  13: strptime(.enclose(x), .enclose(fmt), tz)
  
  ── 3. Error: Up-to-date metadata catalogue should have at least 6569 stations. (
  input string 1022 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: 16 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