Drug Ontology Parsing Engine

Provides information on drug names (brand, generic and street) for drugs tracked by the DEA. There are functions that will search synonyms and return the drug names and types. The vignettes have extensive information on the work done to create the data for the package.


Drug Ontology Parsing Engine (DOPE)

CRAN status Lifecycle: maturing

The goal of DOPE is to provide a structured vocabulary and tools to look up details on drugs tracked by the DEA. The data structure is:

Figure 1. Detailed view of data structure can be seen on the package website.

Installation

Official Release

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

install.packages("DOPE")

Development Release

Run these two lines of code to install DOPE from GitHub (this requires RTools for Windows or Xcode for Mac to be installed on your computer):

if (!requireNamespace("devtools")) install.packages("devtools")
devtools::install_github("CTN-0094/DOPE")

Examples

You can look up details on a drug with the lookup() function. It will check brand, generic and street names.

library(DOPE)
lookup("adderall")
lookup("ketamine")
lookup("auntie")

The lookup funciton supports vectorized lookups:

library(DOPE)
lookup("cheese", "pizza", "with", "a", "soda")
lookup(c("Buprenorphine", "Tramadol", "Bup/Nx"))

If your only care about the class and/or category and/or if you search returns many matches you can use the compress_lookup() function to drop columns and then remove duplicate rows.

lookup("cheese", "pizza", "with", "a", "soda") %>%
  compress_lookup(compressClass = FALSE,
                  compressCategory = TRUE,
                  compressSynonym = TRUE)

DOPE now allows for parsing out drug names from a vector which contains free text with the parse() function. You can use it in conjunction withlookup() and compress_lookup()

data(drug_df)
parse(drug_df$textdrug[1:5]) %>%
  lookup()

Additional Information

For more information or to see detailed vignettes, please visit https://ctn-0094.github.io/DOPE/.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("DOPE")

2.1.0 by Raymond Balise, 5 years ago


https://ctn-0094.github.io/DOPE/, https://github.com/CTN-0094/DOPE


Report a bug at https://github.com/CTN-0094/DOPE/issues


Browse source code at https://github.com/cran/DOPE


Authors: Raymond Balise [aut, cre] , Layla Bouzoubaa [aut] , Gabriel Odom [aut] , Nathaniel Castor [aut]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports dplyr, magrittr, stats, stringr, tibble, tidytext, utils

Suggests purrr, knitr, rmarkdown, conflicted, readr, rvest, sqldf, tidyr, testthat, usethis, xml2


See at CRAN