The main purpose of the dbparser package is to parse the DrugBank database which is downloadable in XML format from this link. The parsed data can then be explored and analyzed as desired by the user. The dbparser package further provides the facility of saving the parsed data into a given database.


You can install the released version of dbparser from CRAN with:


or you can install the latest updates directly from the repo

Saving into a database

The parsed data may be saved into a given database. Databases supported by dbparser include MS SQL Server, MySQL and any database supported by DBI package. Following is an example of saving the parsed data into a MySQL database.

Exploring the data

Following is an example involving a quick look at a few aspects of the parsed data. First we look at the proportions of biotech and small-molecule drugs in the data.

Below, we view the different drug_groups in the data and how prevalent they are.

Finally, we look at the drug_targets_actions to observe their proportions as well.

Code of Conduct

Please note that the ‘dbparser’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Contributing Guide

👍🎉 First off, thanks for taking the time to contribute! 🎉👍 Please review our Contributing Guide.