Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publishing from R+knitr to WordPress?

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)

like image 711
Tal Galili Avatar asked Feb 02 '13 10:02

Tal Galili


People also ask

How do you use the knitr in RStudio?

If you are using RStudio, then the “Knit” button (Ctrl+Shift+K) will render the document and display a preview of it.

How can you compile the R Markdown document using knitr package?

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.

Can R Markdown be interactive?

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.


1 Answers

Please test the development version (v1.0.10) of knitr and see if this works: http://yihui.name/knitr/demo/wordpress/

like image 91
Yihui Xie Avatar answered Sep 20 '22 12:09

Yihui Xie