logicSelection {CALIBERcodelists} | R Documentation |
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.
## S3 method for class 'selection' !x ## S3 method for class 'selection' e1 & e2 ## S3 method for class 'selection' e1 | e2
x |
a selection object |
e1 |
a selection object |
e2 |
a selection object |
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
setdictionary('icd10') exposure <- termhas('exposure') tb <- termhas('tuberculosis') exposure & tb exposure | tb