R/dadb.R

dadb <- function(tn,tp,fn,fp) {

    test <- factor(rep(c("+","-"), c(tp+fp,tn+fn)), levels=c("-","+"))
    refstd <- factor(c(rep("present", tp),
                       rep("absent", fp),
                       rep("present", fn),
                       rep("absent", tn)),
                     levels=c("absent","present"))

    data.frame(test, refstd)
}

Try the yapomif package in your browser

Any scripts or data that you put into this service are public.

yapomif documentation built on May 2, 2019, 4:51 p.m.