Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasKook committed Aug 23, 2023
1 parent ac3581d commit edd4645
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions inst/code/intro-binary.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,6 @@ library("pROC")
library("tidyverse")
theme_set(theme_bw())

# FUNs --------------------------------------------------------------------

fmt <- function(x, break.eps = 1e-04, break.middle = 0.01, na.form = "NA", ...) {
format1Pval <- function(pv) {
if (is.na(pv)) {
na.form
}
else if (pv < break.eps) {
paste("<", format(break.eps, scientific = FALSE))
}
else {
largep <- pv >= break.middle
format(pv, digits = 1 + largep, nsmall = 1 + largep,
scientific = FALSE, ...)
}
}
vapply(X = x, FUN = format1Pval, FUN.VALUE = "", USE.NAMES = TRUE)
}


# DGP ---------------------------------------------------------------------

dgp <- function(n = 5e2) {
Expand Down

0 comments on commit edd4645

Please sign in to comment.