Learning to use HPC clusters, R Markdown & GitHub pages

I had just spent the last 3 weeks or so trying to figure out how to use R on the university’s HPC clusters, and thought it would be helpful to produce a guide to help other beginners as well. I wrote it using R Markdown, since I thought I might as well learn how to write in R Markdown better at the same time.

To turn it from a R Markdown (rmd) file to something others can see, I had several options, as pdf or as html. I could convert it to a pdf, and either share it with the lab or put it up somewhere online. The conversion to pdf produced problems with image placement (the images would be placed somewhere else from where I wanted them to be, so that things would fit nicely on the pages). I didn’t want to learn the hack (incorporating some LaTeX formatting etc.) so I thought I could just leave it as a local html which opens on my browser and then use ‘Save as PDF’ to turn it to a pdf. That removed some formatting and didn’t look very nice either.

I found out I could use the RWordpress package to publish the html file rendered to my WordPress site, which I tried (and actually published briefly for about 20 hours before I took it down from this site). Apart from broken image links which I had to fix manually by uploading my images to the media gallery here, it worked quite alright. The formatting wasn’t as nice perhaps, especially the bits with the code, but it worked.

Then I thought about it a bit more and decided perhaps I should learn how to publish it on my GitHub, because then it’ll be easier to make changes to the code and have the website all synced to changes. So I did! I’m quite pleased to have learned this now, it’s been quite fun writing in markdown language and mastering git a bit more. Here’s the guide if you’re interested.