Skip to content

Rachel K Meade Posts

Useful Packages for Data Visualization in R

Researchers spend years thinking through questions, planning experiments, and converting ideas into results. When the time comes to communicate those results, sharing data in a way that is clear and meaningful is essential to get colleagues interested in the work. Often, that means creating visual representations of your data, which can effectively convey what words sometimes cannot.

A prominent, open-source language that offers a variety of data visualization tools is R. Here are some useful resources for effective data visualization in R.

Getting Started
R can be intimidating for beginners. Listed here are virtual books and resources for learning R that I have found helpful.

  • R for Data Science by Hadley Wickham and Garrett Grolemund: R4DS is an overview of R packages {tidyverse} and {ggplot2}, which offer powerful tools for data analysis and visualization. The book is free, but those wishing to donate can support Kākāpō Recovery.
  • {introverse} by Dr. Stephanie Spielman and her lab: This guide is for the absolute R beginner. R documentation can be complex in language and format. To assist novices, this package offers clearer alternate documentation for R and tidyverse functions.

Here are a few packages and resources that are useful for sharing biomedical research with R.

  • {ggplot2}: When plotting in R, you can use the standard, or “base,” plotting functions, or you can use the highly adaptable {ggplot2} package from Hadley Wickham and company. This package offers highly customizable plots of many types and is compatible with the {tidyverse}, which can format and filter data for each plot. Winston Chang, a {ggplot2} developer, offers this useful “cookbook” for graphics in R.
  • {ggprism}: For those who prefer the aesthetics of GraphPad Prism plots but don’t love the cost, {ggprism}, a {ggplot2} extension developed by Charlotte Dawson, offers the clean visualizations of Prism with the flexibility and accessibility of R.
  • {plotly}: When sharing data virtually, this package offers interactive plots with the capacity to highlight and communicate data beyond just what is shown on the plot.

Data visualization is most effective when it is accessible to the widest possible audience. Here are resources to make your plots more inclusive.

  • Colorblindness-friendly colors: Numerous packages, including {viridis} developed by Simon Garnier and {RColorBrewer} developed by Erich Neuwirth, offer color palettes that are visible to individuals with many varieties of colorblindness.
  • Alt text: Using the labs() function in {ggplot2}, it is now possible to add alternate text to R plots to make them more accessible for individuals with visual impairments.

I composed this blog post for the Genetics Society of America Early Career Scientist Weekly Newsletter, published on October 22, 2021. I hope you will find these resources helpful! 

Leave a Comment

The Genetic Detective

With the SARS-CoV-2 pandemic raging on, I’ve been avoiding going out as much as possible. One of the gems I’ve binged while homebound is “The Genetic Detective” on YouTube TV. The most striking aspect of this show is the true “citizen scientist” CeCe Moore, who solves cases, often decades old, using fundamental truths of genetic heredity and some good old-fashioned internet stalking.

While the whole thing does sometimes come off as an ad for her employer, Parabon Nanolabs, the actress-turned-genealogist is, in a sense, emblematic of the roots of science itself: curious individuals who, either by intention or accident, uncover truths that move society forward.

All in all, I came away from the show both amazed with the efficacy of her techniques and assured of the importance of making science accessible to the general public. Non-scientists can and have pushed science in the past. For example, even the inbred mice lines used today were bred, not for research, but for fancy mouse exhibitions in which mice were awarded for unique traits and behaviors, many of which were later revealed to be genetic mutations. CeCe Moore is quite possibly a new age Addie Lathrop, untrained in science but making contributions to the field that may far outlive her. Only time will tell.

Leave a Comment

Hello World!

Welcome to my site!

I am currently a 2nd year doctoral student in the Duke University Program in Genetics & Genomics (UPGG) with a passion for the genetic mechanisms underlying host responses to infectious diseases, which I am now pursuing in the brand new Smith Lab. Additionally, I am a BioCoRE Graduate Scholar at Duke, committed to diversity, equity, inclusion, & antiracism in STEM.

Aside from genetics, I enjoy board games, sketching, singing, learning languages, wearing a mask, and caring for my two cockatiels, Scout (right) & Fionn (left).

1 Comment