tests/testthat/test_filterApprovedDrugs.R

library(epos)
context("test_filterApprovedDrugs")

test_that("Test function filterApprovedDrugs()", {
  utils::data(rawDrugNamesCoOcEpSO, package="epos")
  atchashda <-
    readAtcMapIntoHashMapDrugNamesAtcCodes(
    system.file("extdata", "db-atc.map", package = "epos"), "\t")
  tepso <- rawDrugNamesCoOcEpSO
  fepso <- filterApprovedDrugs(tepso, atchashda)
  expect_that(length(fepso), equals(2973))
})

Try the epos package in your browser

Any scripts or data that you put into this service are public.

epos documentation built on Feb. 20, 2021, 9:09 a.m.