The HealthyR Advent Calendar 2022 was a series of 24 R tips I shared on Twitter last December
It is based on “R for Health Data Science” by Harrison and Pius. Use JKL20 for 20% off, including free worldwide shipping.
Here’s a selection of the most popular ones, all 24 can be fount at this website: https://healthyradvent.netlify.app/
More information about HealthyR, including the book and freely available resources can be found at: https://healthyr.
There are several different ways to make maps in R, and I always have to look it up and figure this out again from previous examples that I’ve used. Today I had another look at what’s currently possible and what’s an easy way of making a world map in ggplot2 that doesn’t require fetching data from various places.
TLDR: Copy this code to plot a world map using the tidyverse:
There’s some explanation on what reshaping data in R means, why we do it, as well as the history, e.g., melt() vs gather() vs pivot_longer() in a previous post: New intuitive ways for reshaping data in R
That post shows how to reshape a single variable that had been recorded/entered across multiple different columns. But if multiple different variables are recorded over multiple different columns, then this is what you might want to do:
TLDR: You can teach R on people’s own laptops without having them install anything or require an internet connection.
Members of the Surgical Informatics team in Ghana, 2019. More information: surgicalinformatics.org
Introduction Running R programming courses on people’s own laptops is a pain, especially as we use a lot of very useful extensions that actually make learning and using R much easier and more fun. But long installation instructions can be very off-putting for complete beginners, and people can be discouraged to learn programming if installation hurdles invoke their imposter syndrome.
Between 2014-2018 I published 29 posts on riinudata.wordpress.com. Today I’m converting all of those to my new website powered by blogdown-Hugo.
Step 1 Read the Migration: From Wordpress chapter of the blogdown book.
Step 2 Get all your wordpress posts into one XML: WP Admin - Tools - Export.
Step 3 Install Exitwp and its dependencies (pyyamp, beautifulsoup4, html2text):
git clone https://github.com/thomasf/exitwp.git sudo easy_install pip sudo pip install pyyaml sudo pip install beautifulsoup4 sudo pip install html2text This worked on macOS1 High Sierra - I already had python installed.
We are live! I wrote my last blog post on Wordpress on 20-October 2017 and promised myself this was the last time. I’ve been blogging on Wordpress since 2014 and the more I used it the more painful it got! This is most likely caused by the fact that I have been thrifting further and further away from point-and-click interfaces anyway…oh and discovering MARKDOWN.
My two rules: text is written in Markdown (I use R Markdown/knitr/bookdown, e.