I would like to be able to write some R code in markdown (including images), compile it with knitr, and publish it into wordpress (including uploading the images to the blog, not as text in the post). All from R.
I am thinking that RWordPress might have some useful tools for the job, though it wasn't updated for about two years now.
Do you think this is "easily" possible? Does any of you have any suggestions regarding this? Any lead will be appreciated.
(p.s: This question is my holy-grail of the year)
If you are using RStudio, then the “Knit” button (Ctrl+Shift+K) will render the document and display a preview of it.
The usual way to compile an R Markdown document is to click the Knit button as shown in Figure 2.1, and the corresponding keyboard shortcut is Ctrl + Shift + K ( Cmd + Shift + K on macOS). Under the hood, RStudio calls the function rmarkdown::render() to render the document in a new R session.
R Markdown documents are a perfect platform for interactive content. To make your documents interactive, add: Interactive JavaScript visualizations based on htmlwidgets, or. Reactive components made with Shiny.
Please test the development version (v1.0.10) of knitr
and see if this works: http://yihui.name/knitr/demo/wordpress/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With