rpsychologist/PubMed — pull request #2 by briatte (2014-06-14 14:20:39+00:00)
Title: Remixed

Here's a remix of your [PubMed XML scraper](http://rpsychologist.com/how-to-download-complete-xml-records-from-pubmed-and-extract-data).

The main function, `pubmed_get` proceeds by incremental downloads of the raw XML data to a batch folder. It does not perform any post-processing, leaving it for other functions.

The code also fixes an issue in the initial code where the `RetMax` counter is incremented, therefore leading to file downloads of increasing (instead of fixed) size.

To test the remix, set the working directory to `PubMedXML` and try out the following:

```{S}
pubmed_count("FCTC OR 'Framework Convention on Tobacco Control'")
pubmed_get("FCTC OR 'Framework Convention on Tobacco Control'", file = "fctc")
pubmed_journals("pubmed_fctc")
pubmed_years("pubmed_fctc")
```

The code contains Roxygen2-like documentation.