map_ATC_to_text: Helper to create the mapping table and translate the input...

Description Usage Arguments Details Value Examples

View source: R/map_ATC_to_text.R

Description

Helper to create the mapping table and translate the input given to translate_ATC_codes().

Usage

1
map_ATC_to_text(ATC_codes, len = 7, api_key)

Arguments

ATC_codes

character vector - ATC codes

len

integer - the length of the ATC code level (7 is the maximum 1 the minimum)

api_key

character - create an account at https://bioportal.bioontology.org/ and it will come with an api key

Details

Since the level depth specified in translate_ATC_codes() needs to be translated to a string length, this helper was written to perform this task in a controled manner.

Value

data.frame

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
ATC_vect <- c("A02BC02", "C03BA08", "A02BC02", "A02BC02", "A07DA03", "A07DA03",
              "A02BC02", "A02BC02", "A02BC02", "A02BC02", "C10AA05", "C10AA05",
              "C10AA05", "N05BA06", "N05BA06", "N05BA06", "N06AX11", "N06AX11")
# you will need to create an account at https://bioportal.bioontology.org/
# to receive an api_key
ATCapiR:::map_ATC_to_text(ATC_vect, len = 7, api_key = api_key)

## End(Not run)

PatrickRWright/ATCapiR documentation built on Jan. 27, 2021, 3:30 a.m.