Wired Output format for R Markdown
- Dominant language
- JavaScript
- Stars
- 47
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Goal : create an output format for R markdown documents.
Exemple : https://github.com/dreamRs/wired/blob/435b6f78315c244da6d614f202d603d382833527/inst/rmarkdown/example.Rmd#L12
What we can do ?
* wrap plots in `wired-image`
* wrap other outputs in `wired-card` ?
* automatically add `wired_divider(2)` after a title `##` ?
What we have ?
A draft for `wired_document` based on `html_document` https://github.com/dreamRs/wired/blob/435b6f78315c244da6d614f202d603d382833527/R/markdown.R#L13
A custom hook for plots by [@cderv](https://github.com/cderv) : https://github.com/dreamRs/wired/blob/435b6f78315c244da6d614f202d603d382833527/R/markdown.R#L31
That need to be declared via `output_format` in `wired_document`, so users don't have to do
```r
knitr::knit_hooks$set(plot = hook_plot_wired)
```
After the hook can be used in chunk like that (must be declared by user this time) :
``````
```{r pressure, echo=FALSE, wired=TRUE}
plot(pressure)
```
``````
Could be nice to be able to set `elevation` parameter in `?wired_image` too
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.