Description Usage Arguments Details Value Examples
View source: R/accessory_funcs.R
Binarize an input value based on a threshold
1 |
x |
numeric; A vector to binarize |
threshold |
numeric; The threshold for binarizing. Will default to the center number between max and min. |
rep_na |
numeric; The value to replace missing values with. Default NA. |
verbose |
boolean; flag for whether to display threshold or not |
Assigns a value of 0 or 1 based on being < or > the thresdhold
, respectively.
If x
= threshold
, x
= 0. NA values are assigned as rep_na
vector; contains 0,1, if below or above the threshold, or 'rep.na' if NA
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.