Open happyshows opened 8 years ago
Thanks for this report. Can you please provide some details on the use case? I mean why do you run a plotly object through pander
? Or are you using Pandoc.brew
?
Hi,
I was attempting to use pander to dynamically create markdown files that allow me to embed plotly visualization in there, so that reader will have some flexibility in the generated html file to do filtering, regrouping.
Thanks a lot, makes a lot of sense, will try to get some time to add support for it soon.
Any news or workarounds on this? I love using pander to dynamically create documents with static ggplot figures and it would be awesome to be able to do the same with plotly. I'm using R 4.0.3 and pander 0.6.3 and I still get the same error reported by the host. Here's the code I'm using:
evalsOptions("width", 900)
evalsOptions("height", 600)
myReport <- Pandoc$new(title="Plots")
for (name in names(plots)) {
myReport$add.paragraph(paste0("## ", name))
myReport$add(plots[[name]])
}
myReport$add.paragraph("") # hack, otherwise there is a figure in the TOC
myReport
Sorry for not making this happen sooner. @timwoelfle, can you please edit your above example to make it reproducible? Eg creating the list of plots
. Please feel free to keep it to a super simple minimal example.
Attached is a reproducible example! The ggplot objects work, but the plotly objects don't. You have to run the notebook in RStudio (e.g. with "Run all") and save it as a notebook, looking at the auto-generated test.nb.html (also attached, knitting won't work).
Error in x[[i]] : subscript out of bounds In addition: Warning message: In pander.default(x$result) : No pander.method for "plotly", reverting to default.No pander.method for "htmlwidget", reverting to default.