From 8d51f5f0797636d20368319913b9d24305ec2f4b Mon Sep 17 00:00:00 2001 From: Ramiro Magno Date: Sun, 17 Dec 2023 00:45:46 +0000 Subject: [PATCH] Update `create_iso8601()` docs One more example about the `problems()` function. --- R/dtc_problems.R | 5 +++++ man/problems.Rd | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/R/dtc_problems.R b/R/dtc_problems.R index d50f9c37..8072f5c6 100644 --- a/R/dtc_problems.R +++ b/R/dtc_problems.R @@ -70,6 +70,11 @@ add_problems <- function(x, dtc) { #' # So now `problems()` returns `NULL` because there are no more parsing issues. #' problems(iso8601_dttm2) #' +#' # If you pass named arguments when calling `create_iso8601()` then they will +#' # be used to create the problems object. +#' iso8601_dttm3 <- create_iso8601(date = dates, .format = "y-m-d") +#' problems(iso8601_dttm3) +#' #' @export problems <- function(x = .Last.value) { probs <- attr(x, "problems") diff --git a/man/problems.Rd b/man/problems.Rd index c820713b..f59090a3 100644 --- a/man/problems.Rd +++ b/man/problems.Rd @@ -54,4 +54,9 @@ iso8601_dttm2 <- create_iso8601(dates, .format = list(formats)) # So now `problems()` returns `NULL` because there are no more parsing issues. problems(iso8601_dttm2) +# If you pass named arguments when calling `create_iso8601()` then they will +# be used to create the problems object. +iso8601_dttm3 <- create_iso8601(date = dates, .format = "y-m-d") +problems(iso8601_dttm3) + }