Skip to content

Commit

Permalink
add return tags for window.R functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ablack3 committed Sep 6, 2023
1 parent e941e7f commit 0c89f10
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/window.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ setClass("EventAperture",
#' A function to construct the observationWindow
#' @param priorDays minimum number of observation days prior to the cohort index. Default 0 days
#' @param postDays minimum number of observation days post cohort index. Default 0 days
#' @return An observation window that can be used in a Capr cohort definition
#' @export
continuousObservation <- function(priorDays = 0L,
postDays = 0L) {
continuousObservation <- function(priorDays = 0L, postDays = 0L) {

methods::new("ObservationWindow",
priorDays = as.integer(priorDays),
Expand Down Expand Up @@ -127,6 +127,7 @@ continuousObservation <- function(priorDays = 0L,
#' @param b the right side of the event window
#' @param index specifying what part of the index we start looking for events
#' either at the index start date or index enddate
#' @return An event window that can be used in a Capr cohort definition
#' @export
eventStarts <- function(a, b, index = c("startDate", "endDate")){

Expand All @@ -151,6 +152,7 @@ eventStarts <- function(a, b, index = c("startDate", "endDate")){
#' @param b the right side of the event window
#' @param index specifying what part of the index we start looking for events
#' either at the index start date or index enddate
#' @return An event window that can be used in a Capr cohort definition
#' @export
eventEnds <- function(a, b, index = c("startDate", "endDate")) {
index <- checkmate::matchArg(index, c("startDate", "endDate"))
Expand Down Expand Up @@ -179,6 +181,7 @@ eventEnds <- function(a, b, index = c("startDate", "endDate")) {
#' @param restrictVisit a logical toggle specifying whether the event should occur on the same visit
#' @param ignoreObservationPeriod a logical toggle specifying whether we can consider events outside the
#' observation period
#' @return An event aperature that can be used in a Capr cohort definition
#' @export
duringInterval <- function(startWindow,
endWindow = NULL,
Expand Down

0 comments on commit 0c89f10

Please sign in to comment.