Rendering reprex...
Error: callr subprocess failed: Functions that produce HTML output found in document targeting markdown_strict output.
Please change the output type of this document to HTML. Alternatively, you can allow
HTML output in non-HTML formats by adding this option to the YAML front-matter of
your rmarkdown file:
always_allow_html: true
Note however that the HTML output will not be visible in non-HTML formats.
If I'm not using R markdown, is there still a way to fix this?
Thanks @mara, and do you know if there's a way of setting the YAML option for the under-the-hood Rmarkdown to always_allow_html: true, as the error suggests? I'm not where I would try to accomplish that.
By default, reprex renders as markdown (which is why it shows up nicely formatted here, on SO, GitHub, etc.).
There is reprex(..., venue = "html"), but that wouldn't modify the YAML exactly as you're describing. I would, however, recommend giving that a whirl before digging in more deeply.
After inquiring at https://github.com/tidyverse/reprex, the bottom line appears to be that ggplotly() is incompatible with reprex() since its output requires a full html environment for rendering. (See github issue here.)