Skip to content

Commit

Permalink
Fig 1 (revised), no edge effect
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Marty committed Feb 12, 2018
1 parent 690660d commit da5588f
Show file tree
Hide file tree
Showing 3 changed files with 422 additions and 44 deletions.
11 changes: 8 additions & 3 deletions eric-figs/R/header.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,14 @@ analysis <- function(data,params){

## CDC Epiweek to Dates
## returns the start date of the CDC epiweek
cdcweekToDate <- function(epiweek, weekday = 0) {
year = epiweek %/% 1e2
week = epiweek %% 1e2
cdcweekToDate <- function(epiweek, weekday = 0, year = NULL, week = NULL) {
if(missing(epiweek)) {
year <- year
week <- week
}else{
year <- epiweek %/% 1e2
week <- epiweek %% 1e2
}
jan1 <- as.Date(ISOdate(year,1,1))
jan1.wday <- as.POSIXlt(jan1)$wday
if (jan1.wday < 4) {
Expand Down
Loading

0 comments on commit da5588f

Please sign in to comment.