Hello
I am "calling" one rmd file from another, because I am collecting the same type of data from different locations. So I have created a 'generic' rmd html output file and am trying to use it in a separate rmd file I am creating for each location. So as follows:
---
title: "location1"
weight: 50
output:
blogdown::html_page:
toc: true
toc_depth: 1
number_sections: true
---
```{r include=FALSE}
#knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
library(here)
# load site data
load(here("saved_data/rdata_woburn_sitedata.RData"))
# copy it to the generic rdata name for the generic rmd file
file.copy(from = (here("saved_data/rdata_woburn_sitedata.RData")), to = file.path(here("saved_data/rdata_get_sitedata.RData")))
# fetch the generic rmd file
knit(here("rmd_template_two_channel.Rmd"))
However, this creates an md file named "rmd_template_two_channel.md", snippet below:.
# Woburn Hill
Click on marker for site details.
```{=html}
<div id="htmlwidget-fbf7a7d74ceb77dbca83" style="width:100%;height:480px;" class="widgetframe html-widget"></div>
<script type="application/json" data-for="htmlwidget-fbf7a7d74ceb77dbca83">{"x":{"url":"fgfgk_files/figure-html//widgets/widget_unnamed-chunk-4.html","options":{"xdomain":"*","allowfullscreen":false,"lazyload":false}},"evals":[],"jsHooks":[]}</script>
Is there a way I can 'call' the generic rmd file to create html output for each location rmd file?
Thanks