Running 'testthat.R' [14s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(pmetar)
  > 
  > test_check("pmetar")
  == Warnings ====================================================================
  -- Warning (test_metar_wx_codes.R:21:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(metar_wx_codes(x3), "Light intensity: Rain; Light intensity: Ice Pellets; Mist (French: Brume)") test_metar_wx_codes.R:21:2
   4. pmetar::metar_wx_codes(x3)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(`*tmp*`, iseq, value = "")
  -- Warning (test_metar_wx_codes.R:21:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(metar_wx_codes(x3), "Light intensity: Rain; Light intensity: Ice Pellets; Mist (French: Brume)") test_metar_wx_codes.R:21:2
   4. pmetar::metar_wx_codes(x3)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(`*tmp*`, iseq, value = "")
  -- Warning (test_metar_wx_codes.R:21:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(metar_wx_codes(x3), "Light intensity: Rain; Light intensity: Ice Pellets; Mist (French: Brume)") test_metar_wx_codes.R:21:2
   4. pmetar::metar_wx_codes(x3)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(`*tmp*`, iseq, value = "")
  -- Warning (test_metar_wx_codes.R:22:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(metar_wx_codes(x4), "Mist (French: Brume)") test_metar_wx_codes.R:22:2
   4. pmetar::metar_wx_codes(x4)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(`*tmp*`, iseq, value = "")
  -- Warning (test_metar_wx_codes.R:23:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(metar_wx_codes(x5), "Light intensity: Rain; Mist (French: Brume)") test_metar_wx_codes.R:23:2
   4. pmetar::metar_wx_codes(x5)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(`*tmp*`, iseq, value = "")
  -- Warning (test_metar_wx_codes.R:23:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(metar_wx_codes(x5), "Light intensity: Rain; Mist (French: Brume)") test_metar_wx_codes.R:23:2
   4. pmetar::metar_wx_codes(x5)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(`*tmp*`, iseq, value = "")
  -- Warning (test_metar_wx_codes.R:24:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(metar_wx_codes(x6), "Light intensity: Snow; Blowing, Snow; Recent: Freezing, Rain") test_metar_wx_codes.R:24:2
   4. pmetar::metar_wx_codes(x6)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(`*tmp*`, iseq, value = "")
  -- Warning (test_metar_wx_codes.R:24:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(metar_wx_codes(x6), "Light intensity: Snow; Blowing, Snow; Recent: Freezing, Rain") test_metar_wx_codes.R:24:2
   4. pmetar::metar_wx_codes(x6)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(`*tmp*`, iseq, value = "")
  -- Warning (test_metar_wx_codes.R:24:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(metar_wx_codes(x6), "Light intensity: Snow; Blowing, Snow; Recent: Freezing, Rain") test_metar_wx_codes.R:24:2
   4. pmetar::metar_wx_codes(x6)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(`*tmp*`, iseq, value = "")
  -- Warning (test_metar_wx_codes.R:25:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(metar_wx_codes(x7), "Light intensity: Rain") test_metar_wx_codes.R:25:2
   4. pmetar::metar_wx_codes(x7)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(`*tmp*`, iseq, value = "")
  -- Warning (test_metar_wx_codes.R:26:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(metar_wx_codes(x8), "Light intensity: Showers, Rain; Recent: Showers, Rain") test_metar_wx_codes.R:26:2
   4. pmetar::metar_wx_codes(x8)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(`*tmp*`, iseq, value = "")
  -- Warning (test_metar_wx_codes.R:26:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(metar_wx_codes(x8), "Light intensity: Showers, Rain; Recent: Showers, Rain") test_metar_wx_codes.R:26:2
   4. pmetar::metar_wx_codes(x8)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(`*tmp*`, iseq, value = "")
  -- Warning (test_metar_wx_codes.R:27:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(metar_wx_codes(x9), "Light intensity: Rain; Light intensity: Snow; Mist (French: Brume)") test_metar_wx_codes.R:27:2
   4. pmetar::metar_wx_codes(x9)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(`*tmp*`, iseq, value = "")
  -- Warning (test_metar_wx_codes.R:27:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(metar_wx_codes(x9), "Light intensity: Rain; Light intensity: Snow; Mist (French: Brume)") test_metar_wx_codes.R:27:2
   4. pmetar::metar_wx_codes(x9)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(`*tmp*`, iseq, value = "")
  -- Warning (test_metar_wx_codes.R:27:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(metar_wx_codes(x9), "Light intensity: Rain; Light intensity: Snow; Mist (French: Brume)") test_metar_wx_codes.R:27:2
   4. pmetar::metar_wx_codes(x9)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(`*tmp*`, iseq, value = "")
  -- Warning (test_metar_wx_codes.R:28:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(metar_wx_codes(x10), "Light intensity: Rain, Ice Pellets") test_metar_wx_codes.R:28:2
   4. pmetar::metar_wx_codes(x10)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(`*tmp*`, iseq, value = "")
  -- Warning (test_metar_wx_codes.R:29:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(...) test_metar_wx_codes.R:29:2
   4. pmetar::metar_wx_codes(x)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(...)
  -- Warning (test_metar_wx_codes.R:29:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(...) test_metar_wx_codes.R:29:2
   4. pmetar::metar_wx_codes(x)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(...)
   9. base::`[<-.factor`(`*tmp*`, thisvar, value = "Light intensity:")
  -- Warning (test_metar_wx_codes.R:29:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(...) test_metar_wx_codes.R:29:2
   4. pmetar::metar_wx_codes(x)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(...)
   9. base::`[<-.factor`(`*tmp*`, thisvar, value = "Light intensity:")
  -- Warning (test_metar_wx_codes.R:29:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(...) test_metar_wx_codes.R:29:2
   4. pmetar::metar_wx_codes(x)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(...)
   9. base::`[<-.factor`(`*tmp*`, thisvar, value = "Recent:")
  -- Warning (test_metar_wx_codes.R:29:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(...) test_metar_wx_codes.R:29:2
   4. pmetar::metar_wx_codes(x)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(...)
   9. base::`[<-.factor`(`*tmp*`, thisvar, value = "Recent:")
  -- Warning (test_metar_wx_codes.R:38:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(...) test_metar_wx_codes.R:38:2
   4. pmetar::metar_wx_codes(dx$metar)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(...)
  -- Warning (test_metar_wx_codes.R:38:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(...) test_metar_wx_codes.R:38:2
   4. pmetar::metar_wx_codes(dx$metar)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(...)
   9. base::`[<-.factor`(`*tmp*`, thisvar, value = "Light intensity:")
  -- Warning (test_metar_wx_codes.R:38:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(...) test_metar_wx_codes.R:38:2
   4. pmetar::metar_wx_codes(dx$metar)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(...)
   9. base::`[<-.factor`(`*tmp*`, thisvar, value = "Light intensity:")
  -- Warning (test_metar_wx_codes.R:38:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(...) test_metar_wx_codes.R:38:2
   4. pmetar::metar_wx_codes(dx$metar)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(...)
   9. base::`[<-.factor`(`*tmp*`, thisvar, value = "Recent:")
  -- Warning (test_metar_wx_codes.R:38:3): Check WX codes ------------------------
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(...) test_metar_wx_codes.R:38:2
   4. pmetar::metar_wx_codes(dx$metar)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(...)
   9. base::`[<-.factor`(`*tmp*`, thisvar, value = "Recent:")
  -- Warning (test_metar_wx_codes.R:64:3): Correct and incorrect METAR reports ---
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(...) test_metar_wx_codes.R:64:2
   4. pmetar::metar_wx_codes(dx$metar)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(`*tmp*`, 1:nrow(wx_extracted), , value = "")
   9. base::`[<-.factor`(...)
  -- Warning (test_metar_wx_codes.R:64:3): Correct and incorrect METAR reports ---
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(...) test_metar_wx_codes.R:64:2
   4. pmetar::metar_wx_codes(dx$metar)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(...)
   9. base::`[<-.factor`(`*tmp*`, thisvar, value = "Light intensity:")
  -- Warning (test_metar_wx_codes.R:64:3): Correct and incorrect METAR reports ---
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(...) test_metar_wx_codes.R:64:2
   4. pmetar::metar_wx_codes(dx$metar)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(...)
   9. base::`[<-.factor`(`*tmp*`, thisvar, value = "Light intensity:")
  -- Warning (test_metar_wx_codes.R:64:3): Correct and incorrect METAR reports ---
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(...) test_metar_wx_codes.R:64:2
   4. pmetar::metar_wx_codes(dx$metar)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(...)
   9. base::`[<-.factor`(`*tmp*`, thisvar, value = "Recent:")
  -- Warning (test_metar_wx_codes.R:64:3): Correct and incorrect METAR reports ---
  invalid factor level, NA generated
  Backtrace:
   1. testthat::expect_equal(...) test_metar_wx_codes.R:64:2
   4. pmetar::metar_wx_codes(dx$metar)
   5. pmetar:::wx_code_extract(...)
   7. base::`[<-.data.frame`(...)
   9. base::`[<-.factor`(`*tmp*`, thisvar, value = "Recent:")
  
  == Failed tests ================================================================
  -- Error (test_metar_cloud_coverage.R:16:3): Check cloud coverage output -------
  Error: no applicable method for 'type' applied to an object of class "factor"
  Backtrace:
      x
   1. +-testthat::expect_equal(...) test_metar_cloud_coverage.R:16:2
   2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
   3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
   4. \-pmetar::metar_cloud_coverage("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG")
   5.   \-stringr::str_detect(x, pattern = lp_dt$pattern_text[i])
   6.     \-stringr:::type(pattern)
  -- Error (test_metar_cloud_coverage.R:37:3): Incorrect METAR reports -----------
  Error: no applicable method for 'type' applied to an object of class "factor"
  Backtrace:
      x
   1. +-testthat::expect_equal(metar_cloud_coverage(x8), "") test_metar_cloud_coverage.R:37:2
   2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
   3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
   4. \-pmetar::metar_cloud_coverage(x8)
   5.   \-stringr::str_detect(x, pattern = lp_dt$pattern_text[i])
   6.     \-stringr:::type(pattern)
  -- Error (test_metar_cloud_coverage.R:46:3): Correct and incorrect METAR reports --
  Error: no applicable method for 'type' applied to an object of class "factor"
  Backtrace:
      x
   1. +-testthat::expect_is(metar_cloud_coverage(dx$metar), "character") test_metar_cloud_coverage.R:46:2
   2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
   3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
   4. \-pmetar::metar_cloud_coverage(dx$metar)
   5.   \-stringr::str_detect(x, pattern = lp_dt$pattern_text[i])
   6.     \-stringr:::type(pattern)
  -- Failure (test_metar_wx_codes.R:21:3): Check WX codes ------------------------
  metar_wx_codes(x3) not equal to "Light intensity: Rain; Light intensity: Ice Pellets; Mist (French: Brume)".
  1/1 mismatches
  x[1]: "Light intensity: Rain; Light intensity: Ice Pellets; NA Mist (French: Bru
  x[1]: me)"
  y[1]: "Light intensity: Rain; Light intensity: Ice Pellets; Mist (French: Brume)
  y[1]: "
  -- Failure (test_metar_wx_codes.R:22:3): Check WX codes ------------------------
  metar_wx_codes(x4) not equal to "Mist (French: Brume)".
  1/1 mismatches
  x[1]: "NA Mist (French: Brume)"
  y[1]: "Mist (French: Brume)"
  -- Failure (test_metar_wx_codes.R:23:3): Check WX codes ------------------------
  metar_wx_codes(x5) not equal to "Light intensity: Rain; Mist (French: Brume)".
  1/1 mismatches
  x[1]: "Light intensity: Rain; NA Mist (French: Brume)"
  y[1]: "Light intensity: Rain; Mist (French: Brume)"
  -- Failure (test_metar_wx_codes.R:24:3): Check WX codes ------------------------
  metar_wx_codes(x6) not equal to "Light intensity: Snow; Blowing, Snow; Recent: Freezing, Rain".
  1/1 mismatches
  x[1]: "Light intensity: Snow; NA Blowing, Snow; Recent: Freezing, Rain"
  y[1]: "Light intensity: Snow; Blowing, Snow; Recent: Freezing, Rain"
  -- Failure (test_metar_wx_codes.R:27:3): Check WX codes ------------------------
  metar_wx_codes(x9) not equal to "Light intensity: Rain; Light intensity: Snow; Mist (French: Brume)".
  1/1 mismatches
  x[1]: "Light intensity: Rain; Light intensity: Snow; NA Mist (French: Brume)"
  y[1]: "Light intensity: Rain; Light intensity: Snow; Mist (French: Brume)"
  -- Failure (test_metar_wx_codes.R:29:3): Check WX codes ------------------------
  metar_wx_codes(x) not equal to c(...).
  8/10 mismatches
  x[3]: "NA Rain; NA Ice Pellets; 1 Mist (French: Brume)"
  y[3]: "Light intensity: Rain; Light intensity: Ice Pellets; Mist (French: Brume)
  y[3]: "
  
  x[4]: "NA Mist (French: Brume); 1 ; 1"
  y[4]: "Mist (French: Brume)"
  
  x[5]: "NA Rain; 1 Mist (French: Brume); 1"
  y[5]: "Light intensity: Rain; Mist (French: Brume)"
  
  x[6]: "NA Snow; 1 Blowing, Snow; NA Freezing, Rain"
  y[6]: "Light intensity: Snow; Blowing, Snow; Recent: Freezing, Rain"
  
  x[7]: "NA Rain; 1 ; 1"
  y[7]: "Light intensity: Rain"
  -- Failure (test_metar_wx_codes.R:38:3): Check WX codes ------------------------
  metar_wx_codes(dx$metar) not equal to c(...).
  8/10 mismatches
  x[3]: "NA Rain; NA Ice Pellets; 1 Mist (French: Brume)"
  y[3]: "Light intensity: Rain; Light intensity: Ice Pellets; Mist (French: Brume)
  y[3]: "
  
  x[4]: "NA Mist (French: Brume); 1 ; 1"
  y[4]: "Mist (French: Brume)"
  
  x[5]: "NA Rain; 1 Mist (French: Brume); 1"
  y[5]: "Light intensity: Rain; Mist (French: Brume)"
  
  x[6]: "NA Snow; 1 Blowing, Snow; NA Freezing, Rain"
  y[6]: "Light intensity: Snow; Blowing, Snow; Recent: Freezing, Rain"
  
  x[7]: "NA Rain; 1 ; 1"
  y[7]: "Light intensity: Rain"
  -- Failure (test_metar_wx_codes.R:64:3): Correct and incorrect METAR reports ---
  metar_wx_codes(dx$metar) not equal to c(...).
  8/13 mismatches
  x[3]: "NA Rain; NA Ice Pellets; 1 Mist (French: Brume)"
  y[3]: "Light intensity: Rain; Light intensity: Ice Pellets; Mist (French: Brume)
  y[3]: "
  
  x[4]: "NA Mist (French: Brume); 1 ; 1"
  y[4]: "Mist (French: Brume)"
  
  x[5]: "NA Rain; 1 Mist (French: Brume); 1"
  y[5]: "Light intensity: Rain; Mist (French: Brume)"
  
  x[6]: "NA Snow; 1 Blowing, Snow; NA Freezing, Rain"
  y[6]: "Light intensity: Snow; Blowing, Snow; Recent: Freezing, Rain"
  
  x[7]: "NA Rain; 1 ; 1"
  y[7]: "Light intensity: Rain"
  
  [ FAIL 11 | WARN 31 | SKIP 0 | PASS 364 ]
  Error: Test failures
  Execution halted