Simple-R-gists

Showcase short R examples

View on GitHub

Visualise interaction between 2 variables with parallel sets diagrams

I-Hsuan Lin

University of Manchester

March 07, 2022

Introduction

This notebook shows readers how to use ggforce package to create parallel sets diagram to show the interaction between 2 categorical variables.

About demo datasets

All the datasets are available from CRAN or bioconductor.

  1. The Titanic dataset (from R) provides information on the fate of passengers on the ocean liner ‘Titanic’.
  2. The fission dataset provides a RangedSummarizedExperiment object of read counts in genes for a time course RNA-Seq experiment of fission yeast (Schizosaccharomyces pombe) in response to oxidative stress at 0, 15, 30, 60, 120 and 180 mins.
  3. The TENxPBMCData single-cell RNA-seq data for on PBMC cells, generated by 10X Genomics.