if(input$nature == "Pre-LMP") {
ifelse(
lubridate::wday(dates_study()$P1[1]) == 1,
nb_weeks <- 2,
nb_weeks <- 3
)
}
if(input$nature == "Post-LMP") {
ifelse(
lubridate::wday(dates_study()$P2[1]) == 1,
nb_weeks <- 4,
nb_weeks <- 5
)
}
if(input$nature == "Last Week") {
ifelse(
lubridate::wday(dates_study()$P3[1]) == 1,
nb_weeks <- 1,
nb_weeks <- 2
)
}
if(input$nature == "Last Two Weeks Before Delivery") {
ifelse(
lubridate::wday(dates_study()$P4[1]) == 1,
nb_weeks <- 2,
nb_weeks <- 3
)
}
if(input$nature %in% c("Pre-LMP", "Post-LMP", "Last Week", "Last Two Weeks Before Delivery")) {
updateVirtualSelect(
session = session,
"nb_weeks_display",
NULL,
choices = choices_weeks_display,
selected = nb_weeks
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.