---
layout: post
title: "Using the rentrez R package to search PubMed to plot the number of papers by year (CC212)"
blurb: "How fast is the microbiome literature growing?"
author: "PD Schloss"
date: 2022-05-12 11:00
comments: false
youtube: QX5aIzG8SQk
start_hash: 474c73c27918b30665bef197b4639b0fe1062be3
end_hash: 3c75b89f3adaa2c35013bd98866667bcb204ab14
---

Pat will show you how to search PubMed from R using the rentrez package to understand how the number of papers in a field has grown over time. He'll share two ways. First, he'll get the data directly from PubMed and import them into R. Second, he'll automate the process using the rentrez R package, which allows you to search PubMed and any NCBI database from within R. Along the way, he'll show how to analyze the data using R functions from dplyr and ggplot2 within RStudio.


<iframe style="margin: 0 auto;display:block;" width="560" height="315" src="https://www.youtube.com/embed/{{ page.youtube }}" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>


## Code

You can browse the state of the repository at the
* [beginning of the episode](https://github.com/riffomonas/literature_analysis/tree/{{ page.start_hash }})
* [end of the episode](https://github.com/riffomonas/literature_analysis/tree/{{ page.end_hash }})
