From d45e6cf0c03f7fac34b9a58f1d72bd6e877105cd Mon Sep 17 00:00:00 2001 From: Sophie Shapcott Date: Sun, 25 Feb 2024 16:47:43 +0000 Subject: [PATCH] #164 #228 #234 - Selected the accurate `expected_formats` from `xportr_format()` and added to the `xportr-utils.R` script. --- R/utils-xportr.R | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/R/utils-xportr.R b/R/utils-xportr.R index ca89ed74..f7390ccc 100644 --- a/R/utils-xportr.R +++ b/R/utils-xportr.R @@ -237,30 +237,30 @@ xpt_validate <- function(data) { "E8601DN.", "E8601DN10.", "E8601TM.", - paste0("E8601TM", 8:15, "."), - paste0("E8601TM", 8:15, ".", 0:6), + paste("E8601TM", 8:15, ".", sep = ""), + paste("E8601TM", 8:15, ".", sort(rep(0:6, 8)), sep = ""), "E8601TZ.", - paste("E8601TZ", 9:20, "."), - paste("E8601TZ", 9:20, ".", 0:6), + paste("E8601TZ", 9:20, ".", sep = ""), + paste("E8601TZ", 9:20, ".", sort(rep(0:6, 12)), sep = ""), "E8601TX.", - paste0("E8601TX", 9:20, "."), + paste("E8601TX", 9:20, ".", sep = ""), "E8601DT.", - paste0("E8601DT", 16:26, "."), - paste0("E8601DT", 16:26, ".", 0:6), + paste("E8601DT", 16:26, ".", sep = ""), + paste("E8601DT", 16:26, ".", sort(rep(0:6, 11)), sep = ""), "E8601LX.", - paste0("E8601LX", 20:35, "."), + paste("E8601LX", 20:35, ".", sep = ""), "E8601LZ.", - paste0("E8601LZ", 9:20, "."), + paste("E8601LZ", 9:20, ".", sep = ""), "E8601DX.", - paste0("E8601DX", 20:35, "."), + paste("E8601DX", 20:35, ".", sep = ""), "B8601DT.", - paste0("B8601DT", 15:26, "."), - paste0("B8601DT", 15:26, ".", 0:6), + paste("B8601DT", 15:26, ".", sep = ""), + paste("B8601DT", 15:26, ".", sort(rep(0:6, 12)), sep = ""), "IS8601DA.", "B8601DA.", - paste0("B8601DA", 8:10, "."), + paste("B8601DA", 8:10, ".", sep = ""), "weekdate.", - paste0("weekdate", 3:37, "."), + paste("weekdate", 3:37, ".", sep = ""), "mmddyy.", "ddmmyy.", "yymmdd.",