Running examples in 'rebus.datetimes-Ex.R' failed
The error most likely occurred in:

> ### Name: OPT_LEADING_0
> ### Title: Date-time regexes
> ### Aliases: AM_PM CENTURY CENTURY_IN DAY DAY_IN DAY_OF_YEAR DAY_OF_YEAR_IN
> ###   DAY_SINGLE DMY DMY_IN DTSEP DYM DYM_IN DateTime FRACTIONAL_SECOND
> ###   FRACTIONAL_SECOND_IN HM HMS HMS_IN HM_IN HOUR12 HOUR12_IN
> ###   HOUR12_SINGLE HOUR24 HOUR24_IN HOUR24_SINGLE ISO_DATE ISO_DATETIME
> ###   ISO_DATETIME_IN ISO_DATE_IN ISO_TIME ISO_TIME_IN MDY MDY_IN MINUTE
> ###   MINUTE_IN MONTH MONTH_IN MS MS_IN MYD MYD_IN OPT_LEADING_0 SECOND
> ###   SECOND_IN TIMEZONE TIMEZONE_OFFSET WEEKDAY0 WEEKDAY1 WEEK_OF_YEAR
> ###   WEEK_OF_YEAR_IN YDM YDM_IN YEAR YEAR2 YEAR4 YMD YMD_IN datetime
> ### Keywords: datasets
> 
> ### ** Examples
> 
> datetime("%m/%d/%Y")             # match US style dates
<regex> (?:(?:0[1-9]|1[0-2])/(?:0[1-9]|[12][0-9]|3[01])/[0-9]{4})
> twelve_or_twentyfour <- rebus.base::or("%H", "%I%p")
> datetime(twelve_or_twentyfour) # match hours in 24h or 12h format
<regex> (?:(?:(?:[01][0-9]|2[0-3])|(?:0[1-9]|1[0-2])(?:am|AM|pm|PM)))
> 
> ## Not run: 
> ##D # week days and months can be matched in any locale
> ##D if(.Platform$OS.type == "windows")
> ##D {
> ##D   fr_FR <- "French_France"
> ##D   ar_QA <- "Arabic_Qatar"
> ##D } else if(Sys.info()["sysname"] != "Darwin") # mac
> ##D {
> ##D   fr_FR <- "fr_FR"
> ##D   ar_QA <- "ar_QA"
> ##D } else if(Sys.info()["sysname"] != "Linux")
> ##D {
> ##D   fr_FR <- "fr_FR.utf8"
> ##D   ar_QA <- "ar_QA.utf8"
> ##D }
> ##D datetime("%a %A %b %B", fr_FR)
> ##D datetime("%a %A %b %B", ar_QA)
> ##D 
> ##D # All letter tokens.  Lots of output.
> ##D x <- paste0("%", c(letters, LETTERS))
> ##D stats::setNames(datetime(x), x)
> ## End(Not run)
> 
> # Individual date-time components
> DTSEP             # optional selected punctuation or space
<regex> [-/.:,\ ]?
> CENTURY           # exactly two digits
<regex> [0-9]{2}
> YEAR              # one to four digits
<regex> [0-9]{1,4}
> YEAR2             # exactly two digits
<regex> [0-9]{2}
> YEAR4             # exactly four digits
<regex> [0-9]{4}
> MONTH             # number from 1 to 12, leading zero
<regex> (?:0[1-9]|1[0-2])
> WEEK_OF_YEAR      # number from 0 to 53, leading zero
<regex> (?:[0-4][0-9]|5[0-3])
> DAY               # number from 1 to 31, leading zero
<regex> (?:0[1-9]|[12][0-9]|3[01])
> DAY_SINGLE        # leading space
<regex> (?: [1-9]|[12][0-9]|3[01])
> HOUR24            # 24 hour clock, leading zero
<regex> (?:[01][0-9]|2[0-3])
> HOUR12            # 12 hour clock, leading zero
<regex> (?:0[1-9]|1[0-2])
> HOUR24_SINGLE     # 24 hour clock, leading space
<regex> (?:[ 1][0-9]|2[0-3])
> HOUR12_SINGLE     # 12 hour clock, leading space
<regex> (?: [1-9]|1[0-2])
> MINUTE            # number from 0 to 59, leading zero
<regex> [0-5][0-9]
> SECOND            # number from 0 to 61 (leap seconds), leading zero
<regex> (?:[0-5][0-9]|6[01])
> FRACTIONAL_SECOND # a second optional decimal point and up to 6 digits
<regex> (?:[0-5][0-9]|6[01])(?:[.,][0-9]{1,6})?
> AM_PM             # AM or PM, any case
<regex> (?:am|AM|pm|PM)
> TIMEZONE_OFFSET   # optional plus or minus, then four digits
<regex> [-+]?[0-9]{4}
> TIMEZONE          # Any value returned by OlsonNames()
<regex> (?:Africa/Abidjan|Africa/Accra|Africa/Addis_Ababa|Africa/Algiers|Africa/Asmara|Africa/Asmera|Africa/Bamako|Africa/Bangui|Africa/Banjul|Africa/Bissau|Africa/Blantyre|Africa/Brazzaville|Africa/Bujumbura|Africa/Cairo|Africa/Casablanca|Africa/Ceuta|Africa/Conakry|Africa/Dakar|Africa/Dar_es_Salaam|Africa/Djibouti|Africa/Douala|Africa/El_Aaiun|Africa/Freetown|Africa/Gaborone|Africa/Harare|Africa/Johannesburg|Africa/Juba|Africa/Kampala|Africa/Khartoum|Africa/Kigali|Africa/Kinshasa|Africa/Lagos|Africa/Libreville|Africa/Lome|Africa/Luanda|Africa/Lubumbashi|Africa/Lusaka|Africa/Malabo|Africa/Maputo|Africa/Maseru|Africa/Mbabane|Africa/Mogadishu|Africa/Monrovia|Africa/Nairobi|Africa/Ndjamena|Africa/Niamey|Africa/Nouakchott|Africa/Ouagadougou|Africa/Porto-Novo|Africa/Sao_Tome|Africa/Timbuktu|Africa/Tripoli|Africa/Tunis|Africa/Windhoek|America/Adak|America/Anchorage|America/Anguilla|America/Antigua|America/Araguaina|America/Argentina/Buenos_Aires|America/Argentina/Catamarca|America/Argentina/ComodRivadavia|America/Argentina/Cordoba|America/Argentina/Jujuy|America/Argentina/La_Rioja|America/Argentina/Mendoza|America/Argentina/Rio_Gallegos|America/Argentina/Salta|America/Argentina/San_Juan|America/Argentina/San_Luis|America/Argentina/Tucuman|America/Argentina/Ushuaia|America/Aruba|America/Asuncion|America/Atikokan|America/Atka|America/Bahia|America/Bahia_Banderas|America/Barbados|America/Belem|America/Belize|America/Blanc-Sablon|America/Boa_Vista|America/Bogota|America/Boise|America/Buenos_Aires|America/Cambridge_Bay|America/Campo_Grande|America/Cancun|America/Caracas|America/Catamarca|America/Cayenne|America/Cayman|America/Chicago|America/Chihuahua|America/Coral_Harbour|America/Cordoba|America/Costa_Rica|America/Creston|America/Cuiaba|America/Curacao|America/Danmarkshavn|America/Dawson|America/Dawson_Creek|America/Denver|America/Detroit|America/Dominica|America/Edmonton|America/Eirunepe|America/El_Salvador|America/Ensenada|America/Fort_Nelson|America/Fort_Wayne|America/Fortaleza|America/Glace_Bay|America/Godthab|America/Goose_Bay|America/Grand_Turk|America/Grenada|America/Guadeloupe|America/Guatemala|America/Guayaquil|America/Guyana|America/Halifax|America/Havana|America/Hermosillo|America/Indiana/Indianapolis|America/Indiana/Knox|America/Indiana/Marengo|America/Indiana/Petersburg|America/Indiana/Tell_City|America/Indiana/Vevay|America/Indiana/Vincennes|America/Indiana/Winamac|America/Indianapolis|America/Inuvik|America/Iqaluit|America/Jamaica|America/Jujuy|America/Juneau|America/Kentucky/Louisville|America/Kentucky/Monticello|America/Knox_IN|America/Kralendijk|America/La_Paz|America/Lima|America/Los_Angeles|America/Louisville|America/Lower_Princes|America/Maceio|America/Managua|America/Manaus|America/Marigot|America/Martinique|America/Matamoros|America/Mazatlan|America/Mendoza|America/Menominee|America/Merida|America/Metlakatla|America/Mexico_City|America/Miquelon|America/Moncton|America/Monterrey|America/Montevideo|America/Montreal|America/Montserrat|America/Nassau|America/New_York|America/Nipigon|America/Nome|America/Noronha|America/North_Dakota/Beulah|America/North_Dakota/Center|America/North_Dakota/New_Salem|America/Nuuk|America/Ojinaga|America/Panama|America/Pangnirtung|America/Paramaribo|America/Phoenix|America/Port-au-Prince|America/Port_of_Spain|America/Porto_Acre|America/Porto_Velho|America/Puerto_Rico|America/Punta_Arenas|America/Rainy_River|America/Rankin_Inlet|America/Recife|America/Regina|America/Resolute|America/Rio_Branco|America/Rosario|America/Santa_Isabel|America/Santarem|America/Santiago|America/Santo_Domingo|America/Sao_Paulo|America/Scoresbysund|America/Shiprock|America/Sitka|America/St_Barthelemy|America/St_Johns|America/St_Kitts|America/St_Lucia|America/St_Thomas|America/St_Vincent|America/Swift_Current|America/Tegucigalpa|America/Thule|America/Thunder_Bay|America/Tijuana|America/Toronto|America/Tortola|America/Vancouver|America/Virgin|America/Whitehorse|America/Winnipeg|America/Yakutat|America/Yellowknife|Antarctica/Casey|Antarctica/Davis|Antarctica/DumontDUrville|Antarctica/Macquarie|Antarctica/Mawson|Antarctica/McMurdo|Antarctica/Palmer|Antarctica/Rothera|Antarctica/South_Pole|Antarctica/Syowa|Antarctica/Troll|Antarctica/Vostok|Arctic/Longyearbyen|Asia/Aden|Asia/Almaty|Asia/Amman|Asia/Anadyr|Asia/Aqtau|Asia/Aqtobe|Asia/Ashgabat|Asia/Ashkhabad|Asia/Atyrau|Asia/Baghdad|Asia/Bahrain|Asia/Baku|Asia/Bangkok|Asia/Barnaul|Asia/Beirut|Asia/Bishkek|Asia/Brunei|Asia/Calcutta|Asia/Chita|Asia/Choibalsan|Asia/Chongqing|Asia/Chungking|Asia/Colombo|Asia/Dacca|Asia/Damascus|Asia/Dhaka|Asia/Dili|Asia/Dubai|Asia/Dushanbe|Asia/Famagusta|Asia/Gaza|Asia/Harbin|Asia/Hebron|Asia/Ho_Chi_Minh|Asia/Hong_Kong|Asia/Hovd|Asia/Irkutsk|Asia/Istanbul|Asia/Jakarta|Asia/Jayapura|Asia/Jerusalem|Asia/Kabul|Asia/Kamchatka|Asia/Karachi|Asia/Kashgar|Asia/Kathmandu|Asia/Katmandu|Asia/Khandyga|Asia/Kolkata|Asia/Krasnoyarsk|Asia/Kuala_Lumpur|Asia/Kuching|Asia/Kuwait|Asia/Macao|Asia/Macau|Asia/Magadan|Asia/Makassar|Asia/Manila|Asia/Muscat|Asia/Nicosia|Asia/Novokuznetsk|Asia/Novosibirsk|Asia/Omsk|Asia/Oral|Asia/Phnom_Penh|Asia/Pontianak|Asia/Pyongyang|Asia/Qatar|Asia/Qostanay|Asia/Qyzylorda|Asia/Rangoon|Asia/Riyadh|Asia/Saigon|Asia/Sakhalin|Asia/Samarkand|Asia/Seoul|Asia/Shanghai|Asia/Singapore|Asia/Srednekolymsk|Asia/Taipei|Asia/Tashkent|Asia/Tbilisi|Asia/Tehran|Asia/Tel_Aviv|Asia/Thimbu|Asia/Thimphu|Asia/Tokyo|Asia/Tomsk|Asia/Ujung_Pandang|Asia/Ulaanbaatar|Asia/Ulan_Bator|Asia/Urumqi|Asia/Ust-Nera|Asia/Vientiane|Asia/Vladivostok|Asia/Yakutsk|Asia/Yangon|Asia/Yekaterinburg|Asia/Yerevan|Atlantic/Azores|Atlantic/Bermuda|Atlantic/Canary|Atlantic/Cape_Verde|Atlantic/Faeroe|Atlantic/Faroe|Atlantic/Jan_Mayen|Atlantic/Madeira|Atlantic/Reykjavik|Atlantic/South_Georgia|Atlantic/St_Helena|Atlantic/Stanley|Australia/ACT|Australia/Adelaide|Australia/Brisbane|Australia/Broken_Hill|Australia/Canberra|Australia/Currie|Australia/Darwin|Australia/Eucla|Australia/Hobart|Australia/LHI|Australia/Lindeman|Australia/Lord_Howe|Australia/Melbourne|Australia/NSW|Australia/North|Australia/Perth|Australia/Queensland|Australia/South|Australia/Sydney|Australia/Tasmania|Australia/Victoria|Australia/West|Australia/Yancowinna|Brazil/Acre|Brazil/DeNoronha|Brazil/East|Brazil/West|CET|CST6CDT|Canada/Atlantic|Canada/Central|Canada/Eastern|Canada/Mountain|Canada/Newfoundland|Canada/Pacific|Canada/Saskatchewan|Canada/Yukon|Chile/Continental|Chile/EasterIsland|Cuba|EET|EST|EST5EDT|Egypt|Eire|Etc/GMT|Etc/GMT\+0|Etc/GMT\+1|Etc/GMT\+10|Etc/GMT\+11|Etc/GMT\+12|Etc/GMT\+2|Etc/GMT\+3|Etc/GMT\+4|Etc/GMT\+5|Etc/GMT\+6|Etc/GMT\+7|Etc/GMT\+8|Etc/GMT\+9|Etc/GMT-0|Etc/GMT-1|Etc/GMT-10|Etc/GMT-11|Etc/GMT-12|Etc/GMT-13|Etc/GMT-14|Etc/GMT-2|Etc/GMT-3|Etc/GMT-4|Etc/GMT-5|Etc/GMT-6|Etc/GMT-7|Etc/GMT-8|Etc/GMT-9|Etc/GMT0|Etc/Greenwich|Etc/UCT|Etc/UTC|Etc/Universal|Etc/Zulu|Europe/Amsterdam|Europe/Andorra|Europe/Astrakhan|Europe/Athens|Europe/Belfast|Europe/Belgrade|Europe/Berlin|Europe/Bratislava|Europe/Brussels|Europe/Bucharest|Europe/Budapest|Europe/Busingen|Europe/Chisinau|Europe/Copenhagen|Europe/Dublin|Europe/Gibraltar|Europe/Guernsey|Europe/Helsinki|Europe/Isle_of_Man|Europe/Istanbul|Europe/Jersey|Europe/Kaliningrad|Europe/Kiev|Europe/Kirov|Europe/Kyiv|Europe/Lisbon|Europe/Ljubljana|Europe/London|Europe/Luxembourg|Europe/Madrid|Europe/Malta|Europe/Mariehamn|Europe/Minsk|Europe/Monaco|Europe/Moscow|Europe/Nicosia|Europe/Oslo|Europe/Paris|Europe/Podgorica|Europe/Prague|Europe/Riga|Europe/Rome|Europe/Samara|Europe/San_Marino|Europe/Sarajevo|Europe/Saratov|Europe/Simferopol|Europe/Skopje|Europe/Sofia|Europe/Stockholm|Europe/Tallinn|Europe/Tirane|Europe/Tiraspol|Europe/Ulyanovsk|Europe/Uzhgorod|Europe/Vaduz|Europe/Vatican|Europe/Vienna|Europe/Vilnius|Europe/Volgograd|Europe/Warsaw|Europe/Zagreb|Europe/Zaporozhye|Europe/Zurich|GB|GB-Eire|GMT|GMT\+0|GMT-0|GMT0|Greenwich|HST|Hongkong|Iceland|Indian/Antananarivo|Indian/Chagos|Indian/Christmas|Indian/Cocos|Indian/Comoro|Indian/Kerguelen|Indian/Mahe|Indian/Maldives|Indian/Mauritius|Indian/Mayotte|Indian/Reunion|Iran|Israel|Jamaica|Japan|Kwajalein|Libya|MET|MST|MST7MDT|Mexico/BajaNorte|Mexico/BajaSur|Mexico/General|NZ|NZ-CHAT|Navajo|PRC|PST8PDT|Pacific/Apia|Pacific/Auckland|Pacific/Bougainville|Pacific/Chatham|Pacific/Chuuk|Pacific/Easter|Pacific/Efate|Pacific/Enderbury|Pacific/Fakaofo|Pacific/Fiji|Pacific/Funafuti|Pacific/Galapagos|Pacific/Gambier|Pacific/Guadalcanal|Pacific/Guam|Pacific/Honolulu|Pacific/Johnston|Pacific/Kanton|Pacific/Kiritimati|Pacific/Kosrae|Pacific/Kwajalein|Pacific/Majuro|Pacific/Marquesas|Pacific/Midway|Pacific/Nauru|Pacific/Niue|Pacific/Norfolk|Pacific/Noumea|Pacific/Pago_Pago|Pacific/Palau|Pacific/Pitcairn|Pacific/Pohnpei|Pacific/Ponape|Pacific/Port_Moresby|Pacific/Rarotonga|Pacific/Saipan|Pacific/Samoa|Pacific/Tahiti|Pacific/Tarawa|Pacific/Tongatapu|Pacific/Truk|Pacific/Wake|Pacific/Wallis|Pacific/Yap|Poland|Portugal|ROC|ROK|Singapore|Turkey|UCT|US/Alaska|US/Aleutian|US/Arizona|US/Central|US/East-Indiana|US/Eastern|US/Hawaii|US/Indiana-Starke|US/Michigan|US/Mountain|US/Pacific|US/Samoa|UTC|Universal|W-SU|WET|Zulu)
> # ISO 8601 formats
> ISO_DATE          # %Y-%m-%d
<regex> [0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])
> ISO_TIME          # %H:%M:%S
<regex> (?:[01][0-9]|2[0-3]):[0-5][0-9]:(?:[0-5][0-9]|6[01])
> ISO_DATETIME      # ISO_DATE followed by ISO_TIME, separated by space or "T".
<regex> [0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])[ T](?:[01][0-9]|2[0-3]):[0-5][0-9]:(?:[0-5][0-9]|6[01])
> # Compound forms, separated by DTSEP
> YMD
<regex> [0-9]{1,4}[-/.:,\ ]?(?:0[1-9]|1[0-2])[-/.:,\ ]?(?:0[1-9]|[12][0-9]|3[01])
> YDM
<regex> [0-9]{1,4}[-/.:,\ ]?(?:0[1-9]|[12][0-9]|3[01])[-/.:,\ ]?(?:0[1-9]|1[0-2])
> MYD
<regex> (?:0[1-9]|1[0-2])[-/.:,\ ]?[0-9]{1,4}[-/.:,\ ]?(?:0[1-9]|[12][0-9]|3[01])
> MDY
<regex> (?:0[1-9]|1[0-2])[-/.:,\ ]?(?:0[1-9]|[12][0-9]|3[01])[-/.:,\ ]?[0-9]{1,4}
> DYM
<regex> (?:0[1-9]|[12][0-9]|3[01])[-/.:,\ ]?[0-9]{1,4}[-/.:,\ ]?(?:0[1-9]|1[0-2])
> DMY
<regex> (?:0[1-9]|[12][0-9]|3[01])[-/.:,\ ]?(?:0[1-9]|1[0-2])[-/.:,\ ]?[0-9]{1,4}
> HMS
<regex> (?:[01][0-9]|2[0-3])[-/.:,\ ]?[0-5][0-9][-/.:,\ ]?(?:[0-5][0-9]|6[01])
> HM
<regex> (?:[01][0-9]|2[0-3])[-/.:,\ ]?[0-5][0-9]
> MS
<regex> [0-5][0-9][-/.:,\ ]?(?:[0-5][0-9]|6[01])
> 
> # Some forms have less strict alternatives for input (with an '_IN' suffix).
> CENTURY_IN
<regex> (?:[0 ]?[0-9]|[0-9]{2})
> MONTH_IN
<regex> (?:[0 ]?[1-9]|1[0-2])
> WEEK_OF_YEAR_IN
<regex> (?:[0 ]?[0-9]|[1-4][0-9]|5[0-3])
> DAY_IN
<regex> (?:[0 ]?[1-9]|[12][0-9]|3[01])
> HOUR24_IN
<regex> (?:[ 01]?[0-9]|2[0-4])
> HOUR12_IN
<regex> (?:[0 ]?[1-9]|1[0-2])
> MINUTE_IN
<regex> [ 0-5]?[0-9]
> SECOND_IN
<regex> (?:[ 0-5]?[0-9]|6[01])
> FRACTIONAL_SECOND_IN
<regex> (?:[ 0-5]?[0-9]|6[01])(?:[.,][0-9]{1,6})?
> ISO_DATE_IN
<regex> [0-9]{4}-(?:[0 ]?[1-9]|1[0-2])-(?:[0 ]?[1-9]|[12][0-9]|3[01])
> ISO_TIME_IN
<regex> (?:[ 01]?[0-9]|2[0-4]):[ 0-5]?[0-9]:(?:[ 0-5]?[0-9]|6[01])
> ISO_DATETIME_IN
<regex> [0-9]{4}-(?:[0 ]?[1-9]|1[0-2])-(?:[0 ]?[1-9]|[12][0-9]|3[01])[ T](?:[ 01]?[0-9]|2[0-4]):[ 0-5]?[0-9]:(?:[ 0-5]?[0-9]|6[01])
> YMD_IN
<regex> [0-9]{1,4}[-/.:,\ ]?(?:[0 ]?[1-9]|1[0-2])[-/.:,\ ]?(?:[0 ]?[1-9]|[12][0-9]|3[01])
> YDM_IN
<regex> [0-9]{1,4}[-/.:,\ ]?(?:[0 ]?[1-9]|[12][0-9]|3[01])[-/.:,\ ]?(?:[0 ]?[1-9]|1[0-2])
> MYD_IN
<regex> (?:[0 ]?[1-9]|1[0-2])[-/.:,\ ]?[0-9]{1,4}[-/.:,\ ]?(?:[0 ]?[1-9]|[12][0-9]|3[01])
> MDY_IN
<regex> (?:[0 ]?[1-9]|1[0-2])[-/.:,\ ]?(?:[0 ]?[1-9]|[12][0-9]|3[01])[-/.:,\ ]?[0-9]{1,4}
> DYM_IN
<regex> (?:[0 ]?[1-9]|[12][0-9]|3[01])[-/.:,\ ]?[0-9]{1,4}[-/.:,\ ]?(?:[0 ]?[1-9]|1[0-2])
> DMY_IN
<regex> (?:[0 ]?[1-9]|[12][0-9]|3[01])[-/.:,\ ]?(?:[0 ]?[1-9]|1[0-2])[-/.:,\ ]?[0-9]{1,4}
> HMS_IN
<regex> (?:[ 01]?[0-9]|2[0-4])[-/.:,\ ]?[ 0-5]?[0-9][-/.:,\ ]?(?:[ 0-5]?[0-9]|6[01])
> HM_IN
<regex> (?:[ 01]?[0-9]|2[0-4])[-/.:,\ ]?[ 0-5]?[0-9]
> MS_IN
<regex> [ 0-5]?[0-9][-/.:,\ ]?(?:[ 0-5]?[0-9]|6[01])
> 
> dates <- seq(as.Date("2000-01-01"), as.Date("2001-01-01"), "1 day")
> datetimes <- seq(as.POSIXct(Sys.Date()), as.POSIXct(Sys.Date() + 1), "1 sec")
> times <- substring(datetimes, 12, 19)
> stopifnot(
+   all(grepl(ISO_DATE, dates)),
+   all(grepl(ISO_TIME, times)),
+   all(grepl(ISO_DATETIME, datetimes))
+ )
Error: all(grepl(ISO_TIME, times)) is not TRUE
Execution halted