wip
This commit is contained in:
parent
fcfc683513
commit
19e3f79371
|
|
@ -21,7 +21,7 @@ editor_options:
|
||||||
# knitr::opts_chunk$set(echo = TRUE)
|
# knitr::opts_chunk$set(echo = TRUE)
|
||||||
# output_file <- params$output_file
|
# output_file <- params$output_file
|
||||||
report_date <- params$report_date
|
report_date <- params$report_date
|
||||||
report_date <- params$mail_day
|
mail_day <- params$mail_day
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# # Activeer de renv omgeving
|
# # Activeer de renv omgeving
|
||||||
|
|
@ -73,16 +73,19 @@ source(here("r_app", "parameters_project.R"))
|
||||||
|
|
||||||
```{r week, message=FALSE, warning=FALSE, include=FALSE}
|
```{r week, message=FALSE, warning=FALSE, include=FALSE}
|
||||||
today <- as.character(report_date)
|
today <- as.character(report_date)
|
||||||
|
mail_day_as_character <- as.character(mail_day)
|
||||||
|
|
||||||
report_date_as_week_day = wday(today)
|
report_date_as_week_day = wday(today)
|
||||||
days_of_week <- c("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
|
days_of_week <- c("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
|
||||||
#als de index of report_date_as_week_day groter dan de index van de mail_day dan moet de week + 1
|
#als de index of report_date_as_week_day groter dan de index van de mail_day dan moet de week + 1
|
||||||
if (which(days_of_week == report_date_as_week_day) > which(days_of_week == mail_day)){
|
|
||||||
week <- week(today) + 1
|
|
||||||
} else {
|
|
||||||
week <- week(today)
|
week <- week(today)
|
||||||
|
if (which(days_of_week == report_date_as_week_day) > which(days_of_week == mail_day_as_character)){
|
||||||
|
week <- week(today) + 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# week <- week(today)
|
# week <- week(today)
|
||||||
|
|
||||||
# week <- 25
|
# week <- 25
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue