Musings on R

A blog on all things R and Data Science by Martin Chan

First Post

Written on April 13, 2019
3 min read


Why start a R blog?

Ever since I discovered r-bloggers and had subsequently learnt immensely from the articles contributed by R users all around the world, I’ve wanted to start a R blog myself. Part of the motivation is give back to the open source community. Since I myself had benefitted so much from R vignettes, blogs, and Stack Overflow discussions, it feels right that I should give something back in some form to the newcomers to R, now that I am able to code in R reasonably well. Another part of the motivation is that I wanted to train myself to present code and ideas in a clear and understandable format. Not only does this encourage myself to think harder about my analysis, good documentation means that anyone else (or my future self) could understand what happened with the analysis. Moreover, as my friend Jonathan Ng loves to say, blogging is scalable - you can get to so many more people through blogging than simply through one-to-one conversations. And after all, sharing is caring!

This isn’t actually the first time I’ve tried to blog about R or any content with code, but on previous occasions I’ve felt discouraged or given up halfway. Partly, this was because of the faff involved in getting the syntax highlighting and plots to display in the way that I want (I previously tried to blog on blogspot.com - not straightforward, in my experience). I then heard about blogging using RMarkdown - what? That’s possible? I decided to give it a try and was pleasantly surprised by how easy and streamlined the entire process was. I can even show ggplots! (Yes, it’s iris again, groan - but hey, it works!)

iris %>%
  ggplot(aes(x = Sepal.Length, y = Sepal.Width, color = Species)) +
  geom_point()

If you’re interested in blogging about R, I highly recommend that you give it a go. I even managed to host this on GitHub pages, which means you get free hosting, which is pretty bomb.

To get started, check out this repo by Florian Privé, which provides a template to build a lightweight, effective blog optimised for sharing R code.

Note

This is my first ever time creating a blog post using only RMarkdown. I used a template from the package called prettyjekyll, which was fairly straightforward. A lot of the styling and the inital code was borrowed from Florian Privé, where you can check out his Github account at https://github.com/privefl.

Browse by topic

 vignettes   tidyverse   learning-r   rdatatable   surveys   open-source   interviews   excel   rmarkdown   statistics   shiny   political-analytics   package-reviews   data-collection