crunchWHOCC: Extract ATC data from the WHOCC web page

View source: R/crunchWHOCC.R

crunchWHOCCR Documentation

Extract ATC data from the WHOCC web page

Description

The crunchWHOCC function recursively queries the WHOCC web page to extract the ATC data.

Usage

crunchWHOCC(codes, baseurl = "https://www.whocc.no/atc_ddd_index/?code=",
            encoding = "utf-8")

Arguments

codes

Optional character vector of ATC codes to query. If not specified, the full ATC database will be queried.

baseurl

Character string specifying the URL to be used for the query.

encoding

The expected encoding of the returned HTML pages. Although specified to be iso-8859-1 in the HTML header, the data seems to be encoded, and provided, in utf-8.

Value

The function returns a list with 3 data.frames:

atc: the data.frame with the ATC data (columns key, name and level).

ddd: the data.frame with the defined daily dose data for level 5 ATC codes (columns key, ddd, unit, administration_route and note).

metadata: the data.frame with some general information (columns name and value).

Author(s)

Johannes Rainer

See Also

atc, keys, atcData

Examples


## See the vignette for an example how to use this function.


jotsetung/atc documentation built on July 29, 2022, 6:57 p.m.