Skip to content

Commit

Permalink
[Fix #564] Document epiweek as US CDC week
Browse files Browse the repository at this point in the history
  • Loading branch information
vspinu committed Oct 3, 2017
1 parent aefc121 commit e4ad2c3
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions R/accessors-week.r
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,18 @@ week <- function(x)
1L + (as.numeric(date) - jan1) %/% 7L
}

#' @description
#' `isoweek()` returns
#' the week as it would appear in the ISO 8601 system, which uses a reoccurring
#' leap week.
#' @description `isoweek()` returns the week as it would appear in the ISO 8601
#' system, which uses a reoccurring leap week.
#' @rdname week
#' @export
isoweek <- function(x) {
.other_week(x, 1)
}

#' @description
#' `epiweek()` returns the week as it conventional in
#' epidemiology. Epiweek follows same rules as `isoweek()` but starts on Sunday.
#' @description `epiweek()` is the US CDC version of epidemiological week. It
#' follows same rules as `isoweek()` but starts on Sunday. In other parts of
#' the world the convention is to start epidemiological weeks on Monday,
#' which is the same as `isoweek`.
#'
#' @rdname week
#' @export
Expand Down

0 comments on commit e4ad2c3

Please # to comment.