AtcDb-class | R Documentation |
The AtcDb
provides the data from the Anatomical Therapeutic
Chemical (ATC) Classification System as defined by the WHOCC (WHO
Collaborating Centre for Drug Statistics Methodology).
In this system, drugs are classified into groups at 5 different levels:
Indicates the anatomical main group and consists of one letter (e.g. C for cardiovascular system).
Indicates the therapeutic main group and consists of two digits (e.g. C03 for diuretic drugs. Note that the digits 03 have another meaning in another level, i.e. D03 stands for Treatment of wounds and ulcers).
Indicates the therapeutic/pharmacological subgroup and consists of one letter (e.g. C03C for High-ceiling diuretics).
indicates the chemical/therapeutic/pharmacological subgroup and consists of one letter (e.g. C03CA for Sulfonamides).
The fifth level indicates the chemical substance and consists of two digits (e.g. C03CA01 for Furosemide).
## S4 method for signature 'AtcDb' as.data.frame(x, row.names=NULL, optional=FALSE, ...) ## S4 method for signature 'AtcDb' atcs(x, columns=listColumns(x), filter=AnnotationFilterList(), order.by="key", ...) ## S4 method for signature 'AtcDb' columns(x) ## S4 method for signature 'AtcDb' dbconn(x) ## S4 method for signature 'AtcDb' keys(x, level, ...) ## S4 method for signature 'AtcDb' listColumns(x) ## S4 method for signature 'AtcDb' listTables(x, ...)
(in alphabetic order)
columns |
A character vector specifying the columns that should be
returned. Use the |
filter |
Either a single filter object or a |
key |
A character vector of ATC code(s). Use method |
level |
A numeric vector specifying the ATC code level(s) (from 1 to 5) that should be retrieved from the database. |
optional |
For |
order.by |
For |
row.names |
For |
x |
The |
... |
Presently not used. |
For details on the database tables and the columns please refer to the Vignette. Note that the defined daily dose (ddd) is only available for level 5 codes, and that each of these can have several different ddds.
The main columns are:
The ATC code of the entry.
The english name of the entry.
The ATC level of the entry (1 to 5).
(Only for level 5 entries): the defined daily doses. This may not be defined for all drugs.
The unit of the dose in ddd.
The route of administration for the drug.
Eventual additional information related to the ddd.
Refer to the method and function description above for detailed information on the returned result object.
AtcDb
objects are created by the constructor function
AtcDb
. The database is automatically loaded on package startup
and the AtcDb
object providing access to the data is available
through the atc
variable. Thus, there should be no need to load
or instatiate such an object manually.
The connection to the internal SQLite database.
Internal list to be used to set/specify properties. Not used at present.
list
providing the available column names in each table
(names being the table names, elements the column/attribute
names).
(in alphabetic order)
Extract the full ATC data from the database and return it as
data.frame
.
This method is deprecated; please use atcs
instead which
provides much more flexibility.
Retrieve data from the database. This method allows to query
either the full data from the database (if called without
additional arguments) or allows to search and retrieve specific
information, e.g. ATC data from specified ATC levels or ATC data
where the name matches the supplied pattern.
The method returns a data.frame
with the columns specified
by the argument columns
or (by default) all columns.
Retrieve data from the database. Arguments columns
and
filter
allow to specify which columns and entries should be
fetched from the database.
Returns a character vector with the column names of the database tables.
Returns the connection to the internal (RSQLite) database.
Returns a character vector of all ATC codes in the database, or
ATC codes of the level(s) that was/were specified with argument
level
.
Returns a list
of column names in each table. The names of
the list correspond to the table names.
Johannes Rainer.
The WHO Collaborating Centre for Drug Statistics Methodology, Oslo, Norway (http://www.whocc.no).
## Display some information on the database. atc ## List all columns in the database. columns(atc) ## List tables and columns. listTables(atc) ## Extract the full data as data.frame. tmp <- as.data.frame(atc) head(tmp) ## Get all the ATC codes of level 1. keys(atc, level=1) ## Get all data for ATC codes of level 1 atcs(atc, filter=LevelFilter(1)) ##atcData(atc, level=1) ## Get all data for ATC codes of level 2:4 ## tmp <- atcData(atc, level=2:4) atcs(atc, filter=LevelFilter(2:4)) ## Get all data containing "cardio" or "kidney" in the name ##atcData(atc, pattern=c("cardio", "renal"), level=1:3) ## Use filters instead. atcs(atc, filter=LevelFilter(1:3)) ## See the vignette for more examples.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.