Skip to content

Commit

Permalink
added detail of replacement of NA values for 0 to calculate coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsantiagoquevedo committed Oct 4, 2023
1 parent e2d519e commit c4ae474
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/coh_data_wrangling.R
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,8 @@ get_immunization_vaccine <- function(data,
#' This function returns the vaccination coverage of a dose along
#' the cohort study. The coverage can be calculated grouped by
#' year, day and month. This most by specified in the parameter unit.
#' To group by year, the dataset must contain more than one year of
#' historical data.
#' If there are not registers for some dates, the function assigns 0,
#' instead of NA, to be able to calculate the cumulative coverage.
#'
#' @param data dataset with cohort information (see example)
#' @param vacc_date_col name of the column(s) that contains the vaccine date
Expand All @@ -663,6 +663,7 @@ get_immunization_vaccine <- function(data,
#' @return data.frame with vaccine number of doses per date, cumulative count
#' of doses and vaccine coverage
#' @examples
#' data("cohortdata")
#' start_cohort <- as.Date("2044-01-01")
#' end_cohort <- as.Date("2044-12-31")
#' date_interval <- c(start_cohort, end_cohort)
Expand Down

0 comments on commit c4ae474

Please sign in to comment.