Scholarly metadata in R

[This article was first published on Recology - R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Scholarly metadata – the meta-information surrounding articles – can be super useful. Although metadata does not contain the full content of articles, it contains a lot of useful information, including title, authors, abstract, URL to the article, etc.

One of the largest sources of metadata is provided via the Open Archives Initiative Protocol for Metadata Harvesting or OAI-PMH. Many publishers, provide their metadata through their own endpoint, and implement the standard OAI-PMH methods: GetRecord, Identify, ListIdentifiers, ListMetadataFormats, ListRecords, and ListSets. Many providers use OAI-PMH, including DataCite, Dryad, and PubMed.

Some data-/article-providers provide their metadata via their own APIs. For example, Nature Publishing Group provides their own metadata API here in non OAI-PMH format; you can get PLoS metadata through their search API, and the BHL (see below) provides their own custom metadata service.

In addition, CrossRef provides a number of metadata search services: metadata search and openurl.

What about the other publishers? (please tell me if I’m wrong about these three)

  • Springer has a metadata API, but it is terrible, soooo…
  • Elsevier, are you kidding? Well, they do have some sort of API service, but its a pain in the ass.
  • Wiley, no better than Elsevier.

Note that metadata can live in other places:

  • Another package being developed by David Springate, rpubmed can get PubMed metadata.
  • Our wrapper to the Mendeley API, RMendeley, gets article metadata via Mendeley’s database.
  • Our wrapper to the Biodiversity Heritage Library API here gets their metadata.

No, you can’t get metadata via Google Scholar – the don’t allow scraping, and don’t have expose their data via an API.

I have discussed this package in a previous blog post, but have since worked on the code a bit, and thought it deserved a new post.

You can see a tutorial for this package here, and contribute to the code here.


Install rmetadata

<span class="c1"># install_github('rmetadata', 'ropensci') # uncomment to install</span>
library<span class="p">(</span>rmetadata<span class="p">)</span>

Count OAI-PMH identifiers for a data provider.

<span class="c1"># For DataCite.</span>
count_identifiers<span class="p">(</span><span class="s">"datacite"</span><span class="p">)</span>

  provider   count
<span class="m">1</span> datacite <span class="m">1216193</span>

Lookup article info via CrossRef with DOI and get a citation.

As Bibtex

print<span class="p">(</span>crossref_citation<span class="p">(</span><span class="s">"10.3998/3336451.0009.101"</span><span class="p">),</span> style <span class="o">=</span> <span class="s">"Bibtex"</span><span class="p">)</span>

<span class="o">@</span>Article<span class="p">{,</span>
  title <span class="o">=</span> <span class="p">{</span>In Google We Trust<span class="o">?</span><span class="p">},</span>
  author <span class="o">=</span> <span class="p">{</span>Geoffrey Bilder<span class="p">},</span>
  journal <span class="o">=</span> <span class="p">{</span>The Journal of Electronic Publishing<span class="p">},</span>
  year <span class="o">=</span> <span class="p">{</span><span class="m">2006</span><span class="p">},</span>
  month <span class="o">=</span> <span class="p">{</span><span class="m">01</span><span class="p">},</span>
  volume <span class="o">=</span> <span class="p">{</span><span class="m">9</span><span class="p">},</span>
  doi <span class="o">=</span> <span class="p">{</span><span class="m">10.3998</span><span class="o">/</span><span class="m">3336451.0009.101</span><span class="p">},</span>
<span class="p">}</span>

As regular text

print<span class="p">(</span>crossref_citation<span class="p">(</span><span class="s">"10.3998/3336451.0009.101"</span><span class="p">),</span> style <span class="o">=</span> <span class="s">"text"</span><span class="p">)</span>

Bilder G <span class="p">(</span><span class="m">2006</span><span class="p">)</span>. <span class="s">"In Google We Trust?"</span> _The Journal of Electronic
Publishing_<span class="p">,</span> <span class="o">*</span><span class="m">9</span><span class="o">*</span>. <span class="o"><</span>URL<span class="o">:</span>
http<span class="o">://</span>dx.doi.org<span class="o">/</span><span class="m">10.3998</span><span class="o">/</span><span class="m">3336451.0009.101</span><span class="o">></span>.

Search the CrossRef Metatdata for DOIs using free form references.

Search with title, author, year, and journal

crossref_search_free<span class="p">(</span>query <span class="o">=</span> <span class="s">"Piwowar Sharing Detailed Research Data Is Associated with Increased Citation Rate PLOS one 2007"</span><span class="p">)</span>

                                                                                             text
<span class="m">1</span> Piwowar Sharing Detailed Research Data Is Associated with Increased Citation Rate PLOS one <span class="m">2007</span>
  match                   doi score
<span class="m">1</span>  <span class="kc">TRUE</span> <span class="m">10.1038</span><span class="o">/</span>npre.2007.361 <span class="m">4.905</span>

Get a DOI and get the citation using \code{crossref_search}

<span class="c1"># Get a DOI for a paper</span>
doi <span class="o"><-</span> crossref_search_free<span class="p">(</span>query <span class="o">=</span> <span class="s">"Piwowar sharing data PLOS one"</span><span class="p">)</span><span class="o">$</span>doi

<span class="c1"># Get the metadata</span>
crossref_search<span class="p">(</span>doi <span class="o">=</span> doi<span class="p">)[,</span> <span class="m">1</span><span class="o">:</span><span class="m">3</span><span class="p">]</span>

                           doi score normalizedScore
<span class="m">1</span> <span class="m">10.1371</span><span class="o">/</span>journal.pone.0000308 <span class="m">18.19</span>             <span class="m">100</span>

Get a random set of DOI’s through CrossRef.

<span class="c1"># Default search gets 20 random DOIs</span>
crossref_r<span class="p">()</span>

 <span class="p">[</span><span class="m">1</span><span class="p">]</span> <span class="s">"10.4028/www.scientific.net/MSF.126-128.467"</span>
 <span class="p">[</span><span class="m">2</span><span class="p">]</span> <span class="s">"10.2139/ssrn.548523"</span>                       
 <span class="p">[</span><span class="m">3</span><span class="p">]</span> <span class="s">"10.1016/S0012-821X(02)00562-9"</span>             
 <span class="p">[</span><span class="m">4</span><span class="p">]</span> <span class="s">"10.1093/rsq/13.2-3.167"</span>                    
 <span class="p">[</span><span class="m">5</span><span class="p">]</span> <span class="s">"10.5772/55055"</span>                             
 <span class="p">[</span><span class="m">6</span><span class="p">]</span> <span class="s">"10.1515/BC.1999.050"</span>                       
 <span class="p">[</span><span class="m">7</span><span class="p">]</span> <span class="s">"10.1016/S0020-7292(98)90160-6"</span>             
 <span class="p">[</span><span class="m">8</span><span class="p">]</span> <span class="s">"10.1111/j.1439-0418.1985.tb02788.x"</span>        
 <span class="p">[</span><span class="m">9</span><span class="p">]</span> <span class="s">"10.1089/aid.2012.0115"</span>                     
<span class="p">[</span><span class="m">10</span><span class="p">]</span> <span class="s">"10.1016/0002-9378(95)90155-8"</span>              
<span class="p">[</span><span class="m">11</span><span class="p">]</span> <span class="s">"10.1001/jama.1949.02900490055028"</span>          
<span class="p">[</span><span class="m">12</span><span class="p">]</span> <span class="s">"10.1051/jphyscol:1989172"</span>                  
<span class="p">[</span><span class="m">13</span><span class="p">]</span> <span class="s">"10.1016/s0301-2115(03)00298-7"</span>             
<span class="p">[</span><span class="m">14</span><span class="p">]</span> <span class="s">"10.1007/BF02735292"</span>                        
<span class="p">[</span><span class="m">15</span><span class="p">]</span> <span class="s">"10.1016/0003-4916(65)90026-6"</span>              
<span class="p">[</span><span class="m">16</span><span class="p">]</span> <span class="s">"10.4156/jdcta.vol5.issue5.12"</span>              
<span class="p">[</span><span class="m">17</span><span class="p">]</span> <span class="s">"10.1007/s10904-009-9316-2"</span>                 
<span class="p">[</span><span class="m">18</span><span class="p">]</span> <span class="s">"10.1023/A:1021690001832"</span>                   
<span class="p">[</span><span class="m">19</span><span class="p">]</span> <span class="s">"10.1007/s12262-012-0724-0"</span>                 
<span class="p">[</span><span class="m">20</span><span class="p">]</span> <span class="s">"10.1007/bf02192860"</span>
<span class="c1"># Specify you want journal articles only</span>
crossref_r<span class="p">(</span>type <span class="o">=</span> <span class="s">"journal_article"</span><span class="p">)</span>

 <span class="p">[</span><span class="m">1</span><span class="p">]</span> <span class="s">"10.1016/j.jacc.2011.09.055"</span>                                 
 <span class="p">[</span><span class="m">2</span><span class="p">]</span> <span class="s">"10.1002/dev.420170603"</span>                                      
 <span class="p">[</span><span class="m">3</span><span class="p">]</span> <span class="s">"10.4315/0362-028X.JFP-10-403"</span>                               
 <span class="p">[</span><span class="m">4</span><span class="p">]</span> <span class="s">"10.1016/S0925-4927(98)00016-X"</span>                              
 <span class="p">[</span><span class="m">5</span><span class="p">]</span> <span class="s">"10.1111/j.1933-1592.2002.tb00141.x"</span>                         
 <span class="p">[</span><span class="m">6</span><span class="p">]</span> <span class="s">"10.1541/ieejfms.127.629"</span>                                    
 <span class="p">[</span><span class="m">7</span><span class="p">]</span> <span class="s">"10.5539/enrr.v3n1p62"</span>                                       
 <span class="p">[</span><span class="m">8</span><span class="p">]</span> <span class="s">"10.1016/S0960-9776(96)90038-7"</span>                              
 <span class="p">[</span><span class="m">9</span><span class="p">]</span> <span class="s">"10.1016/0925-9635(94)05240-9"</span>                               
<span class="p">[</span><span class="m">10</span><span class="p">]</span> <span class="s">"10.1016/s0929-693x(97)86846-7"</span>                              
<span class="p">[</span><span class="m">11</span><span class="p">]</span> <span class="s">"10.1002/(SICI)1096-9071(199601)48:1<53::AID-JMV9>3.0.CO;2-K"</span>
<span class="p">[</span><span class="m">12</span><span class="p">]</span> <span class="s">"10.1016/s0267-7261(01)00016-1"</span>                              
<span class="p">[</span><span class="m">13</span><span class="p">]</span> <span class="s">"10.1111/j.1748-0361.2003.tb00575.x"</span>                         
<span class="p">[</span><span class="m">14</span><span class="p">]</span> <span class="s">"10.1097/00005721-197701000-00011"</span>                           
<span class="p">[</span><span class="m">15</span><span class="p">]</span> <span class="s">"10.1007/s00894-009-0593-z"</span>                                  
<span class="p">[</span><span class="m">16</span><span class="p">]</span> <span class="s">"10.1071/AR9830063"</span>                                          
<span class="p">[</span><span class="m">17</span><span class="p">]</span> <span class="s">"10.1186/gb-2009-10-4-r39"</span>                                   
<span class="p">[</span><span class="m">18</span><span class="p">]</span> <span class="s">"10.2165/00128415-201113540-00038"</span>                           
<span class="p">[</span><span class="m">19</span><span class="p">]</span> <span class="s">"10.1007/BF00522986"</span>                                         
<span class="p">[</span><span class="m">20</span><span class="p">]</span> <span class="s">"10.1080/19407963.2011.539385"</span>

Search the CrossRef Metatdata API.

<span class="c1"># Search for two different query terms</span>
crossref_search<span class="p">(</span>query <span class="o">=</span> c<span class="p">(</span><span class="s">"renear"</span><span class="p">,</span> <span class="s">"palmer"</span><span class="p">),</span> rows <span class="o">=</span> <span class="m">4</span><span class="p">)[,</span> <span class="m">1</span><span class="o">:</span><span class="m">3</span><span class="p">]</span>

                            doi score normalizedScore
<span class="m">1</span>       <span class="m">10.1126</span><span class="o">/</span>science.1157784 <span class="m">3.253</span>             <span class="m">100</span>
<span class="m">2</span>  <span class="m">10.1002</span><span class="o">/</span>meet.2009.1450460141 <span class="m">2.169</span>              <span class="m">66</span>
<span class="m">3</span> <span class="m">10.4242</span><span class="o">/</span>BalisageVol3.Renear01 <span class="m">2.102</span>              <span class="m">64</span>
<span class="m">4</span> <span class="m">10.4242</span><span class="o">/</span>BalisageVol5.Renear01 <span class="m">2.102</span>              <span class="m">64</span>
<span class="c1"># Get results for a certain year</span>
crossref_search<span class="p">(</span>query <span class="o">=</span> c<span class="p">(</span><span class="s">"renear"</span><span class="p">,</span> <span class="s">"palmer"</span><span class="p">),</span> year <span class="o">=</span> <span class="m">2010</span><span class="p">)[,</span> <span class="m">1</span><span class="o">:</span><span class="m">3</span><span class="p">]</span>

                                  doi  score normalizedScore
<span class="m">1</span>            <span class="m">10.1002</span><span class="o">/</span>meet.14504701218 <span class="m">1.0509</span>             <span class="m">100</span>
<span class="m">2</span>            <span class="m">10.1002</span><span class="o">/</span>meet.14504701240 <span class="m">1.0509</span>             <span class="m">100</span>
<span class="m">3</span>           <span class="m">10.5270</span><span class="o">/</span>OceanObs09.cwp.68 <span class="m">1.0442</span>              <span class="m">99</span>
<span class="m">4</span>               <span class="m">10.1353</span><span class="o">/</span>mpq.2010.0003 <span class="m">0.6890</span>              <span class="m">65</span>
<span class="m">5</span>                  <span class="m">10.1353</span><span class="o">/</span>mpq.0.0041 <span class="m">0.6890</span>              <span class="m">65</span>
<span class="m">6</span>                  <span class="m">10.1353</span><span class="o">/</span>mpq.0.0044 <span class="m">0.6890</span>              <span class="m">65</span>
<span class="m">7</span>                  <span class="m">10.1353</span><span class="o">/</span>mpq.0.0057 <span class="m">0.6890</span>              <span class="m">65</span>
<span class="m">8</span>                    <span class="m">10.1386</span><span class="o">/</span>fm.1.1.2 <span class="m">0.6890</span>              <span class="m">65</span>
<span class="m">9</span>                    <span class="m">10.1386</span><span class="o">/</span>fm.1.2.2 <span class="m">0.6890</span>              <span class="m">65</span>
<span class="m">10</span>                   <span class="m">10.1386</span><span class="o">/</span>fm.1.3.2 <span class="m">0.6890</span>              <span class="m">65</span>
<span class="m">11</span>       <span class="m">10.1097</span><span class="o">/</span>ALN.0b013e3181f09404 <span class="m">0.6090</span>              <span class="m">57</span>
<span class="m">12</span>      <span class="m">10.1016</span><span class="o">/</span>j.urology.2010.02.033 <span class="m">0.6090</span>              <span class="m">57</span>
<span class="m">13</span>              <span class="m">10.1353</span><span class="o">/</span>ect.2010.0025 <span class="m">0.6090</span>              <span class="m">57</span>
<span class="m">14</span>               <span class="m">10.1117</span><span class="o">/</span><span class="m">2.4201001.04</span> <span class="m">0.6090</span>              <span class="m">57</span>
<span class="m">15</span> <span class="m">10.1111</span><span class="o">/</span>j.1835<span class="m">-9310.1977</span>.tb01159.x <span class="m">0.6090</span>              <span class="m">57</span>
<span class="m">16</span>    <span class="m">10.4067</span><span class="o">/</span>S0717<span class="m">-69962010000100001</span> <span class="m">0.6090</span>              <span class="m">57</span>
<span class="m">17</span>    <span class="m">10.4067</span><span class="o">/</span>S0717<span class="m">-69962010000200001</span> <span class="m">0.6090</span>              <span class="m">57</span>
<span class="m">18</span>           <span class="m">10.2105</span><span class="o">/</span>AJPH.2009.191098 <span class="m">0.6029</span>              <span class="m">57</span>
<span class="m">19</span>              <span class="m">10.1353</span><span class="o">/</span>mpq.2010.0004 <span class="m">0.5167</span>              <span class="m">49</span>
<span class="m">20</span>                 <span class="m">10.1353</span><span class="o">/</span>mpq.0.0048 <span class="m">0.5167</span>              <span class="m">49</span>

Get a short DOI from shortdoi.org.

<span class="c1"># Geta a short DOI, just the short DOI returned</span>
short_doi<span class="p">(</span>doi <span class="o">=</span> <span class="s">"10.1371/journal.pone.0042793"</span><span class="p">)</span>

<span class="p">[</span><span class="m">1</span><span class="p">]</span> <span class="s">"10/f2bfz9"</span>
<span class="c1"># Geta a short DOI, all data returned</span>
short_doi<span class="p">(</span>doi <span class="o">=</span> <span class="s">"10.1371/journal.pone.0042793"</span><span class="p">,</span> justshort <span class="o">=</span> <span class="kc">FALSE</span><span class="p">)</span>

<span class="o">$</span>DOI
<span class="p">[</span><span class="m">1</span><span class="p">]</span> <span class="s">"10.1371/journal.pone.0042793"</span>

<span class="o">$</span>ShortDOI
<span class="p">[</span><span class="m">1</span><span class="p">]</span> <span class="s">"10/f2bfz9"</span>

<span class="o">$</span>IsNew
<span class="p">[</span><span class="m">1</span><span class="p">]</span> <span class="kc">FALSE</span>

Get a record from a OAI-PMH data provider.

<span class="c1"># Single provider, one identifier</span>
md_getrecord<span class="p">(</span>provider <span class="o">=</span> <span class="s">"pensoft"</span><span class="p">,</span> identifier <span class="o">=</span> <span class="s">"10.3897/zookeys.1.10"</span><span class="p">)</span>

                                                                                                title
<span class="m">1</span> A new candidate <span class="kr">for</span> a Gondwanaland distribution <span class="kr">in</span> the Zodariidae <span class="p">(</span>Araneae<span class="p">)</span><span class="o">:</span> Australutica <span class="kr">in</span> Africa
      creator date             type
<span class="m">1</span> Jocqué<span class="p">,</span>Rudy <span class="m">2008</span> Research Article
<span class="c1"># Single provider, multiple identifiers</span>
md_getrecord<span class="p">(</span>provider <span class="o">=</span> <span class="s">"pensoft"</span><span class="p">,</span> identifier <span class="o">=</span> c<span class="p">(</span><span class="s">"10.3897/zookeys.1.10"</span><span class="p">,</span> <span class="s">"10.3897/zookeys.4.57"</span><span class="p">))</span>

                                                                                                   title
<span class="m">1</span>    A new candidate <span class="kr">for</span> a Gondwanaland distribution <span class="kr">in</span> the Zodariidae <span class="p">(</span>Araneae<span class="p">)</span><span class="o">:</span> Australutica <span class="kr">in</span> Africa
<span class="m">2</span> Studies of Tiger Beetles. CLXXVIII. A new Lophyra <span class="p">(</span>Lophyra<span class="p">)</span> from Somaliland <span class="p">(</span>Coleoptera<span class="p">,</span> Cicindelidae<span class="p">)</span>
        creator date             type
<span class="m">1</span>   Jocqué<span class="p">,</span>Rudy <span class="m">2008</span> Research Article
<span class="m">2</span> Cassola<span class="p">,</span>Fabio <span class="m">2008</span> Research Article

List available metadata formats from various providers.

<span class="c1"># List metadata formats for a provider</span>
md_listmetadataformats<span class="p">(</span>provider <span class="o">=</span> <span class="s">"dryad"</span><span class="p">)</span>

  metadataPrefix
<span class="m">1</span>         oai_dc
<span class="m">2</span>            rdf
<span class="m">3</span>            ore
<span class="m">4</span>           mets
                                                       schema
<span class="m">1</span>              http<span class="o">://</span>www.openarchives.org<span class="o">/</span>OAI<span class="o">/</span><span class="m">2.0</span><span class="o">/</span>oai_dc.xsd
<span class="m">2</span>                 http<span class="o">://</span>www.openarchives.org<span class="o">/</span>OAI<span class="o">/</span><span class="m">2.0</span><span class="o">/</span>rdf.xsd
<span class="m">3</span> http<span class="o">://</span>tweety.lanl.gov<span class="o">/</span>public<span class="o">/</span>schemas<span class="o">/</span><span class="m">2008-06</span><span class="o">/</span>atom<span class="o">-</span>tron.sch
<span class="m">4</span>                  http<span class="o">://</span>www.loc.gov<span class="o">/</span>standards<span class="o">/</span>mets<span class="o">/</span>mets.xsd
                            metadataNamespace
<span class="m">1</span> http<span class="o">://</span>www.openarchives.org<span class="o">/</span>OAI<span class="o">/</span><span class="m">2.0</span><span class="o">/</span>oai_dc<span class="o">/</span>
<span class="m">2</span>    http<span class="o">://</span>www.openarchives.org<span class="o">/</span>OAI<span class="o">/</span><span class="m">2.0</span><span class="o">/</span>rdf<span class="o">/</span>
<span class="m">3</span>                 http<span class="o">://</span>www.w3.org<span class="o">/</span><span class="m">2005</span><span class="o">/</span>Atom
<span class="m">4</span>                    http<span class="o">://</span>www.loc.gov<span class="o">/</span>METS<span class="o">/</span>
<span class="c1"># List metadata formats for a specific identifier for a provider</span>
md_listmetadataformats<span class="p">(</span>provider <span class="o">=</span> <span class="s">"pensoft"</span><span class="p">,</span> identifier <span class="o">=</span> <span class="s">"10.3897/zookeys.1.10"</span><span class="p">)</span>

            identifier metadataPrefix
<span class="m">1</span> <span class="m">10.3897</span><span class="o">/</span>zookeys.1.10         oai_dc
<span class="m">2</span> <span class="m">10.3897</span><span class="o">/</span>zookeys.1.10           mods
                                             schema
<span class="m">1</span>    http<span class="o">://</span>www.openarchives.org<span class="o">/</span>OAI<span class="o">/</span><span class="m">2.0</span><span class="o">/</span>oai_dc.xsd
<span class="m">2</span> http<span class="o">://</span>www.loc.gov<span class="o">/</span>standards<span class="o">/</span>mods<span class="o">/</span>v3<span class="o">/</span>mods<span class="m">-3-1</span>.xsd
                            metadataNamespace
<span class="m">1</span> http<span class="o">://</span>www.openarchives.org<span class="o">/</span>OAI<span class="o">/</span><span class="m">2.0</span><span class="o">/</span>oai_dc<span class="o">/</span>
<span class="m">2</span>                  http<span class="o">://</span>www.loc.gov<span class="o">/</span>mods<span class="o">/</span>v3

Some plotting – mean number of authors per paper

Okay, so this isn’t a super useful visualization, but you can surely think of something better.

library<span class="p">(</span>ggplot2<span class="p">)</span>
library<span class="p">(</span>ggthemes<span class="p">)</span>
library<span class="p">(</span>reshape<span class="p">)</span>


temp <span class="o"><-</span> md_listrecords<span class="p">(</span>provider <span class="o">=</span> <span class="s">"pensoft"</span><span class="p">,</span> from <span class="o">=</span> <span class="s">"2011-10-01"</span><span class="p">,</span> until <span class="o">=</span> <span class="s">"2012-01-01"</span><span class="p">)</span>
temp2 <span class="o"><-</span> ldply<span class="p">(</span>temp<span class="p">)[,</span> <span class="m">-1</span><span class="p">]</span>
auths <span class="o"><-</span> sapply<span class="p">(</span>temp2<span class="o">$</span>creator<span class="p">,</span> <span class="kr">function</span><span class="p">(</span>x<span class="p">)</span> length<span class="p">(</span>strsplit<span class="p">(</span>as.character<span class="p">(</span>x<span class="p">),</span> 
    <span class="s">";"</span><span class="p">)[[</span><span class="m">1</span><span class="p">]]))</span>
toplot <span class="o"><-</span> data.frame<span class="p">(</span>authors <span class="o">=</span> auths<span class="p">,</span> articletype <span class="o">=</span> temp2<span class="o">$</span>type<span class="p">)</span>
toplot_ <span class="o"><-</span> ddply<span class="p">(</span>toplot<span class="p">,</span> .<span class="p">(</span>articletype<span class="p">),</span> summarise<span class="p">,</span> authors <span class="o">=</span> mean<span class="p">(</span>authors<span class="p">))</span>
toplot_<span class="o">$</span>articletype <span class="o"><-</span> reorder<span class="p">(</span>toplot_<span class="o">$</span>articletype<span class="p">,</span> toplot_<span class="o">$</span>authors<span class="p">)</span>

ggplot<span class="p">(</span>toplot_<span class="p">,</span> aes<span class="p">(</span>articletype<span class="p">,</span> authors<span class="p">))</span> <span class="o">+</span> theme_tufte<span class="p">(</span>base_size <span class="o">=</span> <span class="m">16</span><span class="p">)</span> <span class="o">+</span> geom_bar<span class="p">(</span>stat <span class="o">=</span> <span class="s">"identity"</span><span class="p">)</span> <span class="o">+</span> 
    coord_flip<span class="p">()</span>

center


Get the .Rmd file used to create this post at my github account – or .md file.

Written in Markdown, with help from knitr, and knitcitations.

To leave a comment for the author, please follow the link and comment on their blog: Recology - R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)