Creating a flowchart using R

The diagram package makes it easy to create flowcharts in R. In this post I'll show an example of creating a simple flowchart. The most important part is to understand how the coordinate systems works; once you understand that, it's just a matter of placing your arrows and boxes accordingly to create your flowchart. To...

Continue Reading

Matrix to adjacency list in R

An adjacency list is simply an unordered list that describes connections between vertices. It's a commonly used input format for graphs. In this post, I use the melt() function from the reshape2 package to create an adjacency list from a correlation matrix. I use the geneData dataset, which consists of real but anonymised microarray expression...

Continue Reading

Making a heatmap in R with the superheat package

I discovered the superheat package a few days ago and the adjacent plots feature was really attractive. The superheat #rstats package for making heatmaps looks super! I like the adjacent plots https://t.co/KhyA6K6Ap3 — Dave Tang (@davetang31) February 3, 2017

Continue Reading

Interactive plots in R using plotly

I found out about plotly a couple of months ago via R-bloggers: Gantt charts in R using Plotly via @Rbloggers #rstats https://t.co/LuW8nuQr6c — Dave Tang (@davetang31) May 13, 2016 I finally gave it a go when a friend asked me for help making a Gantt chart and I was impressed with plotly's interactivity and ease...

Continue Reading

Wordcloud of PubMed searches

At the start of this year I created a Twitter account that automatically tweets out papers related to transcriptomes, i.e. a Twitter literature bot. This idea isn't new and there are over 200 Twitter literature bots. However, I wrote my Twitter bot using R (and using the RISmed package to search PubMed for papers) and...

Continue Reading

Miscellaneous plots in R

The R Graphics Cookbook is an awesome book; it's so awesome that I bought the ebook after I bought the hardcopy because one copy of it wasn't enough. I haven't read the book in its entirety yet, but I thought I'll share with you some of the recipes in Chapter 13, which illustrates how to...

Continue Reading