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.
TLDR: there are two new and very intuitive R functions for reshaping data: see Examples of pivot_longer() and pivot_wider() below. At the time of writing, these new functions are extremely fresh and only exist in the development version on GitHub (see Installation), we should probably wait for the tidyverse team to officially release them (in CRAN) before putting them into day-to-day use.
Exciting!
Introduction The juxtapose of data collection vs data analysis: data that was very easy to collect, is probably very hard to analyse, and vice versa.
This post demonstrates the use of two very cool R packages - ggrepel and patchwork.
ggrepel deals with overlapping text labels (Code#1 at the bottom of this post):
patchwork is a very convenient new package for combining multiple different plots together (i.e. what we usually to use grid and gridExtra for).
More info:
https://github.com/slowkow/ggrepel
https://github.com/thomasp85/patchwork
To really demonstrate the power of them, let’s make a global map of country names using ggrepel:
Day 0 (Sunday 18-February 2018) Left Edinburgh at 8am for a 1pm ferry Kennacraig to Port Askaig (Islay). Edinburgh-Kennacraig should be a 3.5h drive (and it was), but we left early to allow for any delays on the road. Arrived on Islay at 3pm and our accommodation near Port Ellen (southern Islay, close to to Ardbeg, Lagavulin, Laphroiaig) was a 40 min drive from the port.
Map of Islay with all its lovely distilleries.
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.
What is Shiny? Shiny is an R package (install.packages("shiny")) for making your outputs interactive. Furthermore, Shiny creates web apps meaning your work can be shared online with people who don’t use R. In other words: with Shiny, R people can make websites without ever learning Javascript etc.
I am completely obsessed with Shiny and these days I end up presenting most of my work in a Shiny app.
If it’s not worth putting in a Shiny app it’s not worth doing.