Reputation: 721
I'm using rmarkdown and i would like some R chunks to submitted to a remote server. I have written an engine for this but i dont want a different name since i want R's syntax highlighting to be kept for this engine.
So i thought i might have something like
```{r remoteAPI=TRUE}
```
And then i could override knitr::knit_engines$get()$r
and call the default engine if remoteAPI
is missing or FALSE. However there isn't a default engine for R.
Upvotes: 1
Views: 120
Reputation: 721
The second approach is trivial. Just before the return in your engine, set
options$engine='r'
. See https://github.com/saptarshiguha/rdatabricks/blob/master/R/knitr_engines.R#L36
Upvotes: 1