diff --git a/ChangeLog b/ChangeLog index 0c6bc28..1a56eb8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ * src/anytime.cpp (convertToTime): Warn if NA values resulting from conversion to character (and only one warning will be give) + * R/anytime.R: Updated docs + * man/anytime.Rd: Idem 2023-09-09 Dirk Eddelbuettel diff --git a/R/anytime.R b/R/anytime.R index 443e49c..3b5d3b7 100644 --- a/R/anytime.R +++ b/R/anytime.R @@ -1,7 +1,7 @@ ## anytime: Use Boost Date_Time to convert date(time) data to POSIXt ## -## Copyright (C) 2015 - 2020 Dirk Eddelbuettel +## Copyright (C) 2015 - 2023 Dirk Eddelbuettel ## ## This file is part of anytime. ## @@ -119,6 +119,14 @@ ##' to \code{TRUE} in startup file. Note that all other inputs such character, ##' factor or ordered are not affected. ##' +##' @section Warnings: +##' As of version 0.3.10, a conversion from character resulting in a \code{NA} +##' will lead to a warning being emitted. At most one warning per call is given: +##' should numerous unparseable values be present on input, only one warning will +##' be show. R offers mechanism to either suppress warnings, or convert them +##' to errors as described in the help page for \code{options()} under the entry +##' for \code{warn}. +##' ##' @title Parse POSIXct or Date objects from input data ##' @param x A vector of type character, integer or numeric with date(time) ##' expressions to be parsed and converted. diff --git a/man/anytime.Rd b/man/anytime.Rd index 867eb81..eb74862 100644 --- a/man/anytime.Rd +++ b/man/anytime.Rd @@ -172,6 +172,16 @@ to \code{TRUE} in startup file. Note that all other inputs such character, factor or ordered are not affected. } +\section{Warnings}{ + +As of version 0.3.10, a conversion from character resulting in a \code{NA} +will lead to a warning being emitted. At most one warning per call is given: +should numerous unparseable values be present on input, only one warning will +be show. R offers mechanism to either suppress warnings, or convert them +to errors as described in the help page for \code{options()} under the entry +for \code{warn}. +} + \examples{ ## See the source code for a full list of formats, and the ## or the reference in help('anytime-package') for details