This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
up_brewer <- function(pik, eps = 1e-06) { | |
if (any(is.na(pik))) | |
stop("there are missing values in the pik vector") | |
list <- pik > eps & pik < 1 - eps | |
pikb <- pik[list] | |
s <- pik | |
N <- as.integer(length(pikb)) | |
sb <- vector(mode = "double", length = N) | |
r <- .C("C_up_brewer", pikb, N, result = sb) | |
s[list] <- r$result |
OlderNewer