Description Usage Arguments Value Note See Also Examples
View source: R/chooseByPriority.R
Chooses a single item of x according to the priority order choice_order
1 | chooseByPriority(x, choice_order)
|
x |
a numeric vector |
choice_order |
a numeric vector giving the order of priorities. Items near the front of the vector have higher priority. |
returns the value of choice_order with the smallest index that is in x. NA if no element of x occurs in choice_order.
Used by addToCohort
to select a single entry per patient.
addToCohort
, addCodelistToCohort
1 2 3 | ##
chooseByPriority(1:4, 3:5) # returns 3
chooseByPriority(1:4, 5:7) # returns NA
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.