explode: Show terms not included in the selection but sharing the...

Description Usage Arguments Details Value See Also Examples

View source: R/explode.R

Description

Returns the selection of terms whose code shares the first few characters with a selected term but which are not included in the selection.

Usage

1
explode(x, level = 3, keep = FALSE, minFreqGPRD = 100, ...)

Arguments

x

a selection object or something which can be coerced to a selection (e.g. a codelist)

level

how many characters of the code should be the same, default is 3 so that, for example, ICD-10 codes A000 and A001 are selected if A009 is in the original selection.

keep

TRUE or FALSE, whether the original selection should be included in the output.

minFreqGPRD

the Read dictionary contains many terms which are used infrequently. This argument is the minimum total number of events for a Read term GPRD for it to be included in the explode selection

...

other arguments to pass to selection, if x needs to be coerced to a selection.

Details

This function is called by showhtml to show non-selected but related terms in the HTML documentation of the codelist.

Value

A selection object containing terms are selected, excluding the original terms supplied.

See Also

as.codelist, assigncat, codematch, dictis, getdictionary, setdictionary, termhas

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
setdictionary('read')
assigncat(1, 'UA|Unstable angina', codematch('I200', 'icd10'))
assigncat(2, 'Angina|Other forms of angina', explode(codematch('I200', 'icd10')))
print(as.codelist())

angina <- selection('angina')
explode(angina)
stopifnot('Preinfarction syndrome' %in% as.codelist(explode(angina))[, term])

setdictionary('icd10')
mi <- codematch('I213', 'icd10')
explode(mi)

CALIBERcodelists documentation built on Feb. 28, 2020, 3:01 a.m.