Wrap-up on Blogging with R Markdown and tumblr

[This article was first published on Jeffrey Horner, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

This is a wrap-up post to summarize a few of the issues I’ve found so far with blogging on tumblr with R Markdown.

tumblr Puts a 1Mb Cap On Its HTML Editor

Fair warning.

When I tried eating my own dogfood while writing the previous posts,
I found that I had to manually upload all those pretty screenshots of
the tumblr interface. For some reason, tumblr was truncating the
HTML I was pasting into its editor. By trial and error, I found out that
they place a cap of around 1Mb on the HTML. That’s essentially 96 R plots
at 504×432 pixels. How do I know? Because I placed this bit of code:

for (i in 1:96) 
   plot(rnorm(i), main = paste(i, "Squares"), 
    col = rainbow(i, alpha = runif(i, 0, 1))[round(runif(i, 1, i))], 
    pch = ".", cex = round(runif(i, 1, 100)))

into an R Markdown file, rendered it to HTML with markdownToHTML(), and uploaded it to my test blog http://testerester.tumblr.com a number of times. Maxed out at 96. Regardless, that’s 96 images I didn’t have to upload manually!

R Highlighting Is Now Fixed

I presumed that the hosted version of highlight.js contained a language definition for R. It actually does not, but it’s easy to include one. I’ve done such and am now hosting my own highlight.packed.js on rapache.net here:


and have updated the tumblr R Markdown theme here:


You Can Drop the Save in the Edit/Save/Knit Iteration

JJ Allaire assures me that you don’t have to save your R Markdown document before you knit it in RStudio. It is saved automatically, and dropping the save action speeds up iterative development by a factor 1.5!

To leave a comment for the author, please follow the link and comment on their blog: Jeffrey Horner.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)