title: How to render directly to html rmd file that contains knit_expand
body: <p>I have two Rmd files</p>
  
  <p>main.Rmd</p>
  
  <pre><code>---
  title: "Report"
  author: "User"
  output:
      flexdashboard::flex_dashboard:
      orientation: columns
      vertical_layout: fill
  ---
  
  
  ```{r setup, include=FALSE}
  library(flexdashboard)
  library(highcharter)
  library(htmlwidgets)
  library(lubridate)
  library(knitr)
  ```
  
  
  ```{r run-numeric-md, include=FALSE}
  warehouse &lt;- data.frame("id" = c("WARE-01", "WARE-02", "WARE-03"))
  warehouse$group &lt;- c("1", "2", "3")
  out = NULL
  for (row in 1:nrow(warehouse))
      {
          out = c(out, knit_expand
              (
                  'template.Rmd', 
                  warehouse_id = warehouse[row, "id"],
                  warehouse_group = warehouse[row, "group"]
              )
          )
      }
  ```
  
  
  `r paste(knit(text = out), collapse = '\n')`
  </code></pre>
  
  <p>and template.Rmd used for knit_expand command</p>
  
  <pre><code>Sales revenue net / {{warehouse_id}} {data-navmenu={{warehouse_group}}}
  =====================================
  
  Column {data-width=500}
  -------------------------------------
  ### {data-height=100}
  
  ```{r}
  valueBox("Sales revenue net",
           caption = paste("Item UPC:&lt;b&gt;", "&lt;/b&gt; :: Contractor ID:&lt;b&gt;", "&lt;/b&gt; :: Warehouse ID:&lt;b&gt;","{{warehouse_id}}" ,"&lt;/b&gt;"))
  ```
  
  ### {data-height=900}
  
  
  
  Column {data-width=500}
  -------------------------------------
  
  ### {data-height=500}
  
  ### {data-height=500}
  </code></pre>
  
  <p>Executing knit to flex_dashboard from menu I am able to produce required output. I would like however to execute the main.rmd from r script file using</p>
  
  <pre><code>rmarkdown::render(
      input = "main.Rmd", 
      output_file = "main.html",
      output_format = "all")
  </code></pre>
  
  <p>However when I execute r code (above) I am getting error</p>
  
  <blockquote>
    <p>Error in do.call(output_format_func, options) :    second argument
    must be a list</p>
  </blockquote>
  
  <p>Any ideas what I am doing wrong?</p>