diff --git a/R/exit.R b/R/exit.R index 7c1ffe58..b05fb187 100644 --- a/R/exit.R +++ b/R/exit.R @@ -141,7 +141,7 @@ drugExit <- function(conceptSet, #' Function to create an exit based on exit based on the end of a continuous drug exposure #' @param index specification of event date to offset. Can be either startDate or endDate -#' @param offsetDays an integer specifying the number of days to offset from the event date +#' @param offsetDays an number specifying the days to offset from the event date. Will coerce to an integer #' @return a fixed Duration exit S4 object used to define the cohort exit as the end of a specified time #' @export fixedExit <- function(index = c("startDate", "endDate"), offsetDays){ @@ -150,7 +150,7 @@ fixedExit <- function(index = c("startDate", "endDate"), offsetDays){ ee <- methods::new("FixedDurationExit", index = index, - offsetDays = offsetDays) + offsetDays = as.integer(offsetDays)) return(ee) } diff --git a/man/fixedExit.Rd b/man/fixedExit.Rd index 0f76328b..5124b3dd 100644 --- a/man/fixedExit.Rd +++ b/man/fixedExit.Rd @@ -9,7 +9,7 @@ fixedExit(index = c("startDate", "endDate"), offsetDays) \arguments{ \item{index}{specification of event date to offset. Can be either startDate or endDate} -\item{offsetDays}{an integer specifying the number of days to offset from the event date} +\item{offsetDays}{an number specifying the days to offset from the event date. Will coerce to an integer} } \value{ a fixed Duration exit S4 object used to define the cohort exit as the end of a specified time