Generate multiple flexdashboard (rmarkdown) filtering on quarters

I am trying to generate multiple flexdashboards in R, the outfile format is .html, I am able to generate one output at a time based on Quarters entered manually. But I was hoping if there is an easier way to do it using for loops to filter the data quarterly and then generate separate flexdashboard outputs

This is where i am manually changing the date range

title = "Q1 2019"
FromDt = "2019-01-01"
ToDt = "2019-03-31"


data_subset<- data%>% select(a,b,c,d,e)%>%
  filter(Date1 >= as.Date(FromDt) & Date1 <= as.Date(ToDt)) %>%
  collect()

I am using a separate R file for rendering the dashboard.

rmarkdown::render("Q012019.Rmd")

This will create a subset of data with the first Quarter of 2019.

What I want is

FromDt = "2017-01-01"
ToDt = "2019-03-31"

Which will automatically subset the data and generate multiple flexdashboards based on each quarter.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.