我想根据某些输入动态更改我正在使用的R降价报告模板的文本。我在PowerShell中调用knitr。
这是我要插入R markdown文本输入的输入:
{
"start": "1/21/2015",
"end": "1/23/2015",
"species: ["RBHS", "DBHS", "CBHS"]
}
.Rmd文件
---
title: "Capture Report"
author: "Mitchell Gritts"
date: Sys.Date()
output: html_document
---
```{r load packages, include = FALSE}
LoadScripts()
```
## Capture Table
All SPECIESLIST captured between STARTDATE and ENDDATE are included
in the table. Data included in the table are Species, NDOW ID, Sex, Age,
Marks and Collar information.
SPECIESLIST,STARTDATE和ENDDATE将替换为输入中的值。
有没有办法通过knitr
或sweave
执行此操作。或者我使用搜索和替换功能来执行此操作?