View source: R/simulate_data_baseline.R
binary_cutoff | R Documentation |
Binary Cut-Off Transformation
binary_cutoff(name, int_cutoff, ext_cutoff)
name |
variable to transform |
int_cutoff |
cut-off for internal patients, numeric between 0 and 1 |
ext_cutoff |
cut-off for external patients, numeric between 0 and 1 |
Transformation function to be used in create_baseline_object()
.
Sets quantile values larger than cut-off value to TRUE
otherwise FALSE
.
# Creates a simple function, where `data` is a `BaselineDataFrame`:
function(data) {
ext <- data$ext == 0
q <- get_quantiles(data, name)
ifelse(ext, q > int_cutoff, q > ext_cutoff)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.