Running 'testthat.R' [8s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(Rnightlights)
  2018-11-01 17:49:23: Creating data folder in temporary location D:\temp\RtmpIZ4cF6/.Rnightlights
  2018-11-01 17:49:23: Data directory created D:\temp\RtmpIZ4cF6/.Rnightlights
  2018-11-01 17:49:23: Rnightlights may require 3GB+. Run setupDataPath() to change the location
  2018-11-01 17:49:27: Upgrading data directory to ver. 0.2.3
  2018-11-01 17:49:27: Renaming tiles:
  2018-11-01 17:49:27: No upgrade required
  2018-11-01 17:49:27: Renaming data files:
  2018-11-01 17:49:27: No upgrade required
  2018-11-01 17:49:27: Renaming country rasters:
  2018-11-01 17:49:27: No upgrade required
  2018-11-01 17:49:27: Remove Old Zonal Files:
  2018-11-01 17:49:27: No upgrade required
  2018-11-01 17:49:27: Upgrade complete!
  > 
  > ## force tests to be executed if in dev release which we define as
  > ## having a sub-release, eg 0.9.15.5 is one whereas 0.9.16 is not
  > if (length(strsplit(packageDescription("Rnightlights")$Version, "\\.")[[1]]) > 3) {	# dev release, and
  +   if (Sys.getenv("RunAllTests") != "no") { 				# if env.var not explicitly set to no
  +     message("Setting \"RunAllTests\"=\"yes\" for development release\n")
  +     Sys.setenv("RunAllTests"="yes")
  +   }
  + }
  > 
  > test_check("Rnightlights")
  2018-11-01 17:49:27: Attempting data directory move
  2018-11-01 17:49:28: The directories are the same. Not changing
  Loading required package: sp
  rgdal: version: 1.3-6, (SVN revision 773)
   Geospatial Data Abstraction Library extensions to R successfully loaded
   Loaded GDAL runtime: GDAL 2.2.3, released 2017/11/20
   Path to GDAL shared files: D:/temp/RtmpElZpqt/RLIBS_2753c29e53b67/rgdal/gdal
   GDAL binary built with GEOS: TRUE 
   Loaded PROJ.4 runtime: Rel. 4.9.3, 15 August 2016, [PJ_VERSION: 493]
   Path to PROJ.4 shared files: D:/temp/RtmpElZpqt/RLIBS_2753c29e53b67/rgdal/proj
   Linking to sp version: 1.3-1 
  
  Attaching package: 'raster'
  
  The following object is masked from 'package:data.table':
  
      shift
  
  Ungltiger Wert fr die Option -n. Der Gltige Bereich liegt zwischen 1 und 4294967295.
  -- 1. Error: ctryCode lookups work (@test-ctrycodes.R#16)  ---------------------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: expect_match(ctryNameToCode("Kenya"), "KEN", fixed = TRUE) at testthat/test-ctrycodes.R:16
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: ctryNameToCode("Kenya")
  5: sapply(ctryNames, function(ctryName) stringr::str_detect(ctryName, "[^[:alpha:]| ]"))
  6: lapply(X = X, FUN = FUN, ...)
  7: FUN(X[[i]], ...)
  8: stringr::str_detect
  9: getExportedValue(pkg, name)
  10: asNamespace(ns)
  11: getNamespace(ns)
  12: tryCatch(loadNamespace(name), error = function(e) stop(e))
  13: tryCatchList(expr, classes, parentenv, handlers)
  14: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  15: value[[3L]](cond)
  
  Ungltiger Wert fr die Option -n. Der Gltige Bereich liegt zwischen 1 und 4294967295.
  -- 2. Error: nlfilenames are correct (@test-nlfilename.R#7)  -------------------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: expect_equal(Rnightlights:::getNlTileZipLclNamePath("VIIRS.M", "201401", 1), file.path(getNlDir("dirNlTiles"), 
         paste0("NL_TILE_VIIRS.M_201401_", Rnightlights:::tileIdx2Name(tileNum = 1, nlType = "VIIRS.M"), 
             ".tgz"))) at testthat/test-nlfilename.R:7
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: Rnightlights:::getNlTileZipLclNamePath("VIIRS.M", "201401", 1)
  5: stringr::str_detect
  6: getExportedValue(pkg, name)
  7: asNamespace(ns)
  8: getNamespace(ns)
  9: tryCatch(loadNamespace(name), error = function(e) stop(e))
  10: tryCatchList(expr, classes, parentenv, handlers)
  11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  12: value[[3L]](cond)
  
  -- 3. Error: nlPeriod dates are correct (@test-nlperiods.R#7)  -----------------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: expect_false(unlist(validNlPeriods(nlPeriods = "1991", nlTypes = "OLS.Y"))) at testthat/test-nlperiods.R:7
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: unlist(validNlPeriods(nlPeriods = "1991", nlTypes = "OLS.Y"))
  5: validNlPeriods(nlPeriods = "1991", nlTypes = "OLS.Y")
  6: stats::setNames(lapply(1:length(nlTypes), function(i) {
         nlT <- nlTypes[i]
         nlPs <- unlist(nlPeriods[i])
         allNlPeriods <- unlist(getAllNlPeriods(nlT))
         valid <- stats::setNames(nlPs %in% allNlPeriods, nlPs)
         if (!all(valid)) 
             message(Sys.time(), "Invalid nlPeriods:: ", nlT, ":", paste0(nlPs[!valid], 
                 sep = ","))
         return(valid)
     }), nlTypes)
  7: lapply(1:length(nlTypes), function(i) {
         nlT <- nlTypes[i]
         nlPs <- unlist(nlPeriods[i])
         allNlPeriods <- unlist(getAllNlPeriods(nlT))
         valid <- stats::setNames(nlPs %in% allNlPeriods, nlPs)
         if (!all(valid)) 
             message(Sys.time(), "Invalid nlPeriods:: ", nlT, ":", paste0(nlPs[!valid], 
                 sep = ","))
         return(valid)
     })
  8: FUN(X[[i]], ...)
  9: unlist(getAllNlPeriods(nlT))
  10: getAllNlPeriods(nlT)
  11: sapply(nlTypes, function(nlType) {
         if (stringr::str_detect(nlType, "OLS")) {
             return(1992:2013)
         }
         else if (stringr::str_detect(nlType, "VIIRS")) {
             if (stringr::str_detect(nlType, "D")) {
                 startDate <- "2017-11-20"
                 nlYrMthDys <- gsub("-", "", seq(as.Date(startDate), as.Date(date(), "%c"), 
                     by = "day"))
                 return(nlYrMthDys)
             }
             else if (stringr::str_detect(nlType, "M")) {
                 startDate <- "2012-04-01"
                 nlYrMths <- substr(gsub("-", "", seq(as.Date(startDate), as.Date(date(), 
                     "%c"), by = "month")), 1, 6)
                 return(nlYrMths)
             }
             else if (stringr::str_detect(nlType, "Y")) {
                 startDate <- "2012-04-01"
                 nlYrs <- substr(gsub("-", "", seq(as.Date(startDate), as.Date(date(), 
                     "%c"), by = "year")), 1, 4)
                 return(nlYrs)
             }
             else return()
         }
         else return()
     }, simplify = FALSE)
  12: lapply(X = X, FUN = FUN, ...)
  13: FUN(X[[i]], ...)
  14: stringr::str_detect
  15: getExportedValue(pkg, name)
  16: asNamespace(ns)
  17: getNamespace(ns)
  18: tryCatch(loadNamespace(name), error = function(e) stop(e))
  19: tryCatchList(expr, classes, parentenv, handlers)
  20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  21: value[[3L]](cond)
  
  -- 4. Error: nlPeriod nlTypes are correct (@test-nlperiods.R#36)  --------------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: expect_that(unlist(getAllNlPeriods(nlTypes = "OLS.Y")), is_a("integer")) at testthat/test-nlperiods.R:36
  2: condition(object)
  3: expect_is(x, class)
  4: quasi_label(enquo(object), label)
  5: eval_bare(get_expr(quo), get_env(quo))
  6: unlist(getAllNlPeriods(nlTypes = "OLS.Y"))
  7: getAllNlPeriods(nlTypes = "OLS.Y")
  8: sapply(nlTypes, function(nlType) {
         if (stringr::str_detect(nlType, "OLS")) {
             return(1992:2013)
         }
         else if (stringr::str_detect(nlType, "VIIRS")) {
             if (stringr::str_detect(nlType, "D")) {
                 startDate <- "2017-11-20"
                 nlYrMthDys <- gsub("-", "", seq(as.Date(startDate), as.Date(date(), "%c"), 
                     by = "day"))
                 return(nlYrMthDys)
             }
             else if (stringr::str_detect(nlType, "M")) {
                 startDate <- "2012-04-01"
                 nlYrMths <- substr(gsub("-", "", seq(as.Date(startDate), as.Date(date(), 
                     "%c"), by = "month")), 1, 6)
                 return(nlYrMths)
             }
             else if (stringr::str_detect(nlType, "Y")) {
                 startDate <- "2012-04-01"
                 nlYrs <- substr(gsub("-", "", seq(as.Date(startDate), as.Date(date(), 
                     "%c"), by = "year")), 1, 4)
                 return(nlYrs)
             }
             else return()
         }
         else return()
     }, simplify = FALSE)
  9: lapply(X = X, FUN = FUN, ...)
  10: FUN(X[[i]], ...)
  11: stringr::str_detect
  12: getExportedValue(pkg, name)
  13: asNamespace(ns)
  14: getNamespace(ns)
  15: tryCatch(loadNamespace(name), error = function(e) stop(e))
  16: tryCatchList(expr, classes, parentenv, handlers)
  17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  18: value[[3L]](cond)
  
  == testthat results  ===========================================================
  OK: 10 SKIPPED: 2 FAILED: 4
  1. Error: ctryCode lookups work (@test-ctrycodes.R#16) 
  2. Error: nlfilenames are correct (@test-nlfilename.R#7) 
  3. Error: nlPeriod dates are correct (@test-nlperiods.R#7) 
  4. Error: nlPeriod nlTypes are correct (@test-nlperiods.R#36) 
  
  Error: testthat unit tests failed
  Execution halted