DOPE
Drug Ontology Parsing Engine
Install / Use
/learn @CTN-0094/DOPEREADME
Drug Ontology Parsing Engine (DOPE) <a href='https://ctn-0094.github.io/DOPE/'><img src='man/figures/DOPE_hex.png' align="right" height="139" /></a>
<!-- badges: start --> <!-- badges: end -->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:

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/.
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
