Publications by Tim Bock
How to Create Sankey Diagrams From Tables (Data Frames) Using R
Create a Sankey Diagram in R with Displayr! Step 1: Create a Tidy data frame The very first step in creating visualizations is to get the data in a useful format. In the case of Sankey diagrams, the trick is to get the data into the tidy data format. This post uses a simple example to make it clear how everything fits together. Below, you can see...
3327 sym R (487 sym/3 pcs)
Using R to Create Free Online Dashboards
It is now possible to create public dashboards, based on R code, for free! To illustrate how it works, I’ve used the free version of Displayr to create a copy of RStudio Connect’s HTML Widgets Showcase. Getting started The first step is to click this link which will prompt you to sign up. Sign up is free. Then all you need to do is clic...
4964 sym R (647 sym/5 pcs) 6 img
3D Correspondence Analysis Plots in R Using Plotly
Explore 3D Correspondence Analysis! Back in the “olden days” of the 1970s it was apparently not unknown for statisticians to create 3D visualizations using tinkertoys. For some inexplicable reason, the advent of the PC led to a decline in this practice, with the result that 3D visualizations are now much less common. However, it is possible...
3368 sym R (953 sym/2 pcs)
Building Online Interactive Simulators for Predictive Models in R
Correctly interpreting predictive models can be tricky. One solution to this problem is to create interactive simulators, where users can manipulate the predictor variables and see how the predictions change. This post describes a simple approach for creating online interactive simulators. It works for any model where there is a predict method. ...
6766 sym R (1275 sym/3 pcs) 6 img
5 Alternatives to the Default R Outputs for GLMs and Linear Models
The standard summary outputs from the glm and lm summary methods are a case in point. If you have been using R for as long as I have (19 or 20 years…) you will no doubt have a certain affection for them, but to a new user they are both ugly and not optimized to aid interpretation. The sad old default summary output from glm and lm The default o...
4288 sym 4 img
Make Beautiful Tables with the Formattable Package
I love the formattable package, but I always struggle to remember its syntax. A quick Google search reveals that I’m not alone in this struggle. This post is intended as a reminder for myself of how the package works – and hopefully you’ll find it useful too! Default formattable example The table below is an R data frame (you can turn most ...
5543 sym R (5816 sym/14 pcs) 34 img
Creating Tables Using R and Pure HTML
A problem with R is that its tables are not good enough to share with non-R users, both in terms of visual attractiveness and ease of reading – particularly when the table is large. Quite a few different packages, tools, and workflows have been developed to address this problem, from formattable through to R Markdown and Displayr, to name a few...
4210 sym R (59 sym/1 pcs) 4 img