Moving rstat-tips.net from wordpress to blogdown

I’ve started this blog five years ago using wordpress. But I admit that it was quite painful to write the articles about R in wordpress.

I had to write the R-code in RStudio, copy it to wordpress. Then I had to run the code and copy the output to wordpress, too.

Any time I want to make changes to the code this procedure gets quite tedious. I’ve also tried to do some steps at medium. But the steps for publishing were the same.

So I was pleased when I stumbled across blogdown. Using blogdown I can write my R code and the article in one step.

Syntax Highlighting of R-Code using Blogdown

As I’m moving this blog from wordpress to blogdown (also see the book about blogdown) I was wonderung how I can get some nice syntax highlighting of the embedded R-code.

The first impression was quite sobering. I used the default .Rmd page type and I got not much highlighting. It was better than that I got at Medium with base functionality. But it’s not quite what I wanted.

But there are two other file types in blogdown.

Blogdown file types

.md is for simple markdown-pages without any R-code. But the other one .Rmarkdown seems to be more promising.