Remove unneeded randomID function

This commit is contained in:
Winston Chang
2016-05-20 11:45:59 -05:00
parent d5975195b3
commit 490064a953
3 changed files with 2 additions and 12 deletions

View File

@@ -75,7 +75,7 @@ showNotification <- function(ui, action = NULL, duration = 5,
{
if (is.null(id))
id <- randomID()
id <- createUniqueId(8)
res <- processDeps(ui, session)
actionRes <- processDeps(action, session)

View File

@@ -94,7 +94,7 @@ Progress <- R6Class(
stop("'session' is not a ShinySession object.")
private$session <- session
private$id <- randomID()
private$id <- createUniqueId(8)
private$min <- min
private$max <- max
private$value <- NULL

View File

@@ -120,16 +120,6 @@ p_randomInt <- function(...) {
withPrivateSeed(randomInt(...))
}
# Return a random hexadecimal string with `length` digits.
randomID <- function(length = 16) {
paste(sample(
c("0", "1", "2", "3", "4", "5", "6", "7", "8","9",
"a", "b", "c", "d", "e", "f"),
length,
replace = TRUE
), collapse = '')
}
isWholeNum <- function(x, tol = .Machine$double.eps^0.5) {
abs(x - round(x)) < tol
}