Dear Andrew,
Thanks for your suggestion.
Loading the data explicitly in the markdown instead of the YAML section
- appeals to me. It is desirable to show the code in the vignette if the
vignette loads it.
However, I would like not to display the code if I pass the data using
the params
How about in the YAML:
params:
configuration: NULL
project_conf: NULL
data: NULL
Then in the first chunk something like:
```{r data-config}
if(is.null(params$data)){
data(data_ionstar, package = "prolfqua")
data = data_ionstar
configuration = data$filtered()$config
}
```
You can use a
I guess I failed to explain:
In the yaml section of the rmarkdown I can only use a single R expression;
i.e., I can not write:
```
configuration: !r data('somedata', package="xyz"); somedata$uvw
```
because these are two expressions.
I could write:
xyz::somedata$uvw
So to rephrase my
Hi Witold,
I am not sure what the use case is for loading data in the yaml header.
If you're swapping out data for your vignettes, perhaps your introduction
chunks could contain the code to load the data.
In any case, I recommend that you use `data("dataset", package = "package")`
to load the