Blog Archives

R code golf: the identity matrix

March 27, 2019
By

How many different ways are there to create an identity matrix in R? This was an interesting little challenge set by Guillaume Nicoulaud on Twitter. Find as many way you can to create the identity matrix with #rstats. pic.twitter.com/HlhIM6mSrx— Guillaume Nicoulaud (@ordrespontane) February 3, 2018 In code golf, programmers try to write an algorithm using the shortest programme possible, often exploiting lesser-known...

Read more »

Exploring influence in networks

March 7, 2018
By

I have just published an interactive graphic showing the effect of ranking scientific communities with pairwise comparison models. The visualisation is an interactive version of my (award-winning) useR!2017 poster, Ranking influential communities in networks. You can see how academic journals have been grouped into communities based on their citation behaviour, and notice the relative ranking within and between fields. Occasionally journals don’t...

Read more »

Building a neural network from scratch in R

January 9, 2018
By
Building a neural network from scratch in R

Neural networks can seem like a bit of a black box. But in some ways, a neural network is little more than several logistic regression models chained together. In this post I will show you how to derive a neural network from scratch with just a few lines in R. If you don’t like mathematics, feel free to skip to...

Read more »

Using R on Android

December 29, 2017
By
Using R on Android

I just discovered a way to get R running on my smartphone, with full support for packages, graphics and R Markdown, and no need to connect to an external server. This is really handy for quickly checking R code, trying out ideas and writing blog posts on the go. It works quite well! Here I will show you how to do the...

Read more »

useR! poster: ranking influential communities

June 29, 2017
By
useR! poster: ranking influential communities

Next week I will be presenting a poster at the useR!2017 conference in Brussels. My topic is Ranking influential communities in networks. Using a large dataset of citations from the Web of Science, we grouped academic journals into communities based on their citation behaviour. These communities closely correspond to recognisable research fields, so I was able to label them. We then modelled the...

Read more »

Chernoff faces in ggplot2

June 25, 2017
By
Chernoff faces in ggplot2

I am pleased to introduce my first R package for general consumption, ggChernoff. Inspiration stems from Leland Wilkinson’s book, The Grammar of Graphics, whose principles were later implemented as the layered grammar of graphics in Hadley Wickham’...

Read more »

Publishing from blogdown to GitHub with Travis

June 22, 2017
By
Publishing from blogdown to GitHub with Travis

Yihui Xie’s new blogdown package is a brilliantly elegant and simple tool for creating R-themed blogs and web sites. Starting your own blog is as simple as one line of R code: blogdown::new_site() By default, blogdown uses Hugo, a static web site generator written in Google’s Go programming language. This has a number of advantages over Jekyll (the site generator that powers GitHub...

Read more »

Pretty errors, warnings and messages in R Markdown

June 18, 2017
By
Pretty errors, warnings and messages in R Markdown

When knitting an R Markdown document to HTML output, R chunks can produce warnings, errors or messages. Normally these messages look like any other console output: Pretty ugly, and usually something I find myself trying to hide at the earliest opportunity. But if you’re using R Markdown’s default template, which uses Twitter Bootstrap, you can promote warnings, errors and messages to first-class...

Read more »

Deploying an R Markdown Jekyll site to GitHub Pages

June 16, 2017
By

GitHub Pages’ built-in Jekyll support makes it very easy for techie types to deploy static web sites. Simply push your plain text Markdown content to a repository and the server-side Jekyll engine will render it for the web. Markdown is good, but R Markdown is even better, assuming we ever want to write anything involving plots or data analysis. How can we...

Read more »

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)