From 51b3bc82618e01b426d497dc11e939ad84350676 Mon Sep 17 00:00:00 2001 From: aviezerl Date: Mon, 18 Dec 2023 13:22:48 +0200 Subject: [PATCH] added missing arguments to docs --- R/time.R | 8 +++++--- man/emr_time2char.Rd | 4 +++- man/emr_time2posix.Rd | 4 +++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/R/time.R b/R/time.R index 4396f03..e9f46ff 100644 --- a/R/time.R +++ b/R/time.R @@ -205,6 +205,7 @@ emr_time2date <- function(time) { #' @param time The EMR time to be converted. #' @param show_hour Logical value indicating whether to include the hour in the output. Default is FALSE. #' @param tz Time zone to be used for the output POSIXct object. Default is "UTC". +#' @param posix A POSIXct object to be converted to EMR time. #' #' @return A POSIXct object representing the converted time. #' @@ -243,6 +244,7 @@ emr_time2posix <- function(time, show_hour = FALSE, tz = "UTC") { #' #' @param time The time value to be converted. #' @param show_hour Logical value indicating whether to include the hour in the output. Default is FALSE. +#' @param char A character string to be converted to EMR time. #' #' @return A character string representing the converted time value. #' @@ -268,7 +270,7 @@ emr_time2char <- function(time, show_hour = FALSE) { #' @rdname emr_time2posix #' @export -emr_posix2time <- function(posix, tz = "UTC") { +emr_posix2time <- function(posix) { day <- as.numeric(format(posix, "%d")) month <- as.numeric(format(posix, "%m")) year <- as.numeric(format(posix, "%Y")) @@ -279,8 +281,8 @@ emr_posix2time <- function(posix, tz = "UTC") { #' @rdname emr_time2char #' @export -emr_char2time <- function(char, tz = "UTC") { - return(emr_posix2time(as.POSIXct(char, tz = tz))) +emr_char2time <- function(char) { + return(emr_posix2time(as.POSIXct(char))) } #' Convert time periods to internal time format diff --git a/man/emr_time2char.Rd b/man/emr_time2char.Rd index 5aa1a7d..ad85a61 100644 --- a/man/emr_time2char.Rd +++ b/man/emr_time2char.Rd @@ -7,12 +7,14 @@ \usage{ emr_time2char(time, show_hour = FALSE) -emr_char2time(char, tz = "UTC") +emr_char2time(char) } \arguments{ \item{time}{The time value to be converted.} \item{show_hour}{Logical value indicating whether to include the hour in the output. Default is FALSE.} + +\item{char}{A character string to be converted to EMR time.} } \value{ A character string representing the converted time value. diff --git a/man/emr_time2posix.Rd b/man/emr_time2posix.Rd index f738a41..6b0e823 100644 --- a/man/emr_time2posix.Rd +++ b/man/emr_time2posix.Rd @@ -7,7 +7,7 @@ \usage{ emr_time2posix(time, show_hour = FALSE, tz = "UTC") -emr_posix2time(posix, tz = "UTC") +emr_posix2time(posix) } \arguments{ \item{time}{The EMR time to be converted.} @@ -15,6 +15,8 @@ emr_posix2time(posix, tz = "UTC") \item{show_hour}{Logical value indicating whether to include the hour in the output. Default is FALSE.} \item{tz}{Time zone to be used for the output POSIXct object. Default is "UTC".} + +\item{posix}{A POSIXct object to be converted to EMR time.} } \value{ A POSIXct object representing the converted time.