Right now, the only way to get rendered intems into knitted documents is via plot::() which will send items all the way through the conversion chain, even though earlier steps (say, pdf, or svg) would suffice.
A better way cannot be achieved within plot (because it must respect rescaling etc.), but might be possible by using knit_print() to (optionally) write out some knitr::include_graphics() call on the respective items.
The problem with this is dealing with the file system.
knit_print() however appears to support some kind of meta data, which might include dealing with files.
For HTML output, this could also just be an HTML widget, which, happily, does include facilities for assets.
Right now, the only way to get rendered intems into knitted documents is via
plot::()
which will send items all the way through the conversion chain, even though earlier steps (say, pdf, or svg) would suffice.A better way cannot be achieved within plot (because it must respect rescaling etc.), but might be possible by using
knit_print()
to (optionally) write out someknitr::include_graphics()
call on the respective items. The problem with this is dealing with the file system.knit_print()
however appears to support some kind of meta data, which might include dealing with files.For HTML output, this could also just be an HTML widget, which, happily, does include facilities for assets.