I want to have more html in exams generated by exams2html()
and exams2moodle
. But if I try e.g. to include a ploty plot by
```
library(ggplot2)
library(plotly)
ggplotly(
ggplot(iris, aes(Sepal.Length, Petal.Length)) + geom_jitter()
)
```
exams2html()
contains only a image generated by {webshot}
(I think).
Is it possible to specify some knitr options in the exams-workflow which solve this problem?
EDIT:
Here is a minimal-example for integrating plotly-plots into .Rmd files:
---
title: "Plotly to html within RMarkdown"
output: html_document
---
## Minimal Example
You can integrate `plotly` plots seamlessly into .html-files generated via knitr from .Rmd:
```{r}
library(plotly)
plot_ly(economics, x = ~date, y = ~unemploy / pop)
```