logicSelection: Boolean operators for the S3 selection class

Description Usage Arguments Value See Also Examples

Description

Selection objects are physically stored as a logical (Boolean) vector as long as the number of rows in CALIBER_DICT, stating whether each term is included or excluded from the current selection. Selection objects can be combined using Boolean operators, with the result returned as a selection object.

Usage

1
2
3
4
5
6
## S3 method for class 'selection'
!x
## S3 method for class 'selection'
e1 & e2
## S3 method for class 'selection'
e1 | e2

Arguments

x

a selection object

e1

a selection object

e2

a selection object

Value

x & y returns terms included in both x and y

x | y returns terms included in either x or y

!x returns the selection of terms not included in x

See Also

%AND%, %OR%, NOT

Examples

1
2
3
4
5
setdictionary('icd10')
exposure <- termhas('exposure')
tb <- termhas('tuberculosis')
exposure & tb
exposure | tb

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