You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on producing a report that would ideally use plotly to generate plots and text and in a for loop. It seems like the pagedjs is interfering with the ability for this to work.
Any help with this issue would be greatly appreciated.
Does not render plots.
---
title: "Title of the report"
subtitle: "Subtitle of the report"
author: "Author Name"
date: "Date"
output: pagedown::html_paged
---
```{r setup, include=FALSE}
library(plotly); library(DT)
```
```{r, include=FALSE}
# Init Step to make sure that the dependencies are loaded
htmltools::tagList(datatable(cars))
htmltools::tagList(ggplotly(ggplot()))
```
```{r, results='asis'}
for( col in 1:ncol(cars)) {
print(htmltools::tagList(datatable(cars)))
g <- ggplot(cars) + geom_histogram(aes_string(x=names(cars)[col] ) )
print(htmltools::tagList(ggplotly(g)))
}
```
Does render plots.
---
title: "Title of the report"
subtitle: "Subtitle of the report"
author: "Author Name"
date: "Date"
output: html_document
---
```{r setup, include=FALSE}
library(plotly); library(DT)
```
```{r, include=FALSE}
# Init Step to make sure that the dependencies are loaded
htmltools::tagList(datatable(cars))
htmltools::tagList(ggplotly(ggplot()))
```
```{r, results='asis'}
for( col in 1:ncol(cars)) {
print(htmltools::tagList(datatable(cars)))
g <- ggplot(cars) + geom_histogram(aes_string(x=names(cars)[col] ) )
print(htmltools::tagList(ggplotly(g)))
}
```
The text was updated successfully, but these errors were encountered:
datatable and ggplotly are HTML widgets and are not yet supported by pagedown (see #58). Despite we have a proposal to support them (see #87), it seems that even with #87, solving this use case is not straightforward.
I think #87 needs to be improved to support this case.
Hi all,
I am working on producing a report that would ideally use plotly to generate plots and text and in a for loop. It seems like the pagedjs is interfering with the ability for this to work.
Here is a small reprex taken from here:
https://stackoverflow.com/questions/60685631/using-ggplotly-and-dt-from-a-for-loop-in-rmarkdown
Any help with this issue would be greatly appreciated.
Does not render plots.
Does render plots.
The text was updated successfully, but these errors were encountered: