View source: R/dthelper-computation-functions.R
prepare.roc | R Documentation |
Computes number of true positives, false positive, true negatives, and false negatives for each participant
prepare.roc(df, positive, negative)
df |
data.frame object |
positive |
Variables which has the "correct" answer of 1 |
negative |
Variables which has the "correct" answer of 0 |
data.frame object
set.seed(100) df <- data.frame( p1 = sample(0:1, size = 10, replace = T), p2 = sample(0:1, size = 10, replace = T), n1 = sample(0:1, size = 10, replace = T), n2 = sample(0:1, size = 10, replace = T) ) prepare.roc(df, positive = c("p1","p2"), negative = c("n1","n2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.