I created an RMarkdown file file.Rmd
with parameters.
I know how to access parameters within a r chunk
but not from a bash chunk
If there is absolutely no way to do so, I will write the parameters in a file through r chunk
and then read it from bash chunk
...
---
output: html_document
params:
myParam1:
label: "Choose 1st parameter"
value: 20
input: slider
min: 0
max: 100
myParam2:
label: "Choose 2nd parameter"
value: "Hello"
input: text
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r, echo=FALSE}
print(paste("1st parameter :",params$myParam1))
print(paste("2nd parameter :",params$myParam2))
```
```{bash}
# Don't know how to get parameters here
echo $params
```
Thanks