R/calendarTime.R

Defines functions calendarTime

Documented in calendarTime

#' Triggering condition by calendar time
#'
#' @description
#' Define a condition to trigger trial milestone by calendar time. The milestone will
#' be trigger when a trial has been running for at least the specified
#' duration. It can be used combined with conditions specified by
#' \link[TrialSimulator]{enrollment} and \link[TrialSimulator]{eventNumber}.
#'
#' @param time numeric. Calendar time to trigger a milestone of a trial.
#'
#' @returns an object of class `Condition`
#'
#' @export
calendarTime <- function(time){

  CalendarTimeCondition$new(time)

}

Try the TrialSimulator package in your browser

Any scripts or data that you put into this service are public.

TrialSimulator documentation built on Sept. 9, 2025, 5:26 p.m.