filterApprovedDrugs: Filter a given list of drug names for having an ATC code, if...

filterApprovedDrugsR Documentation

Filter a given list of drug names for having an ATC code, if not they are dropped

Description

Filter a given list of drug names for having an ATC code, if not they are dropped

Usage

filterApprovedDrugs(druglist, atchashda)

Arguments

druglist

a list of drug names

atchashda

a hash containing the drug names as keys

Value

approveddrugs a hash filtered for having an ATC code

Examples

utils::data(rawDrugNamesCoOcEpSO, package="epos")
atchashda <-
  readAtcMapIntoHashMapDrugNamesAtcCodes(
  system.file("extdata", "db-atc.map", package = "epos"), "\t")
tepso <- genDictListFromRawFreq(rawDrugNamesCoOcEpSO)
filterApprovedDrugs(tepso, atchashda)

epos documentation built on May 29, 2024, 3:49 a.m.