R/utils.R

Defines functions which_max is_installed

which_max <- function(x, tolerance = .Machine$double.eps^0.5) {
  which(abs(max(x) - x) < tolerance)
}

#' @importFrom utils installed.packages

is_installed <- function(pkg) {
  pkg %in% rownames(installed.packages())
}

Try the spark package in your browser

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

spark documentation built on July 21, 2017, 1:02 a.m.