R/rloguniform.R

Defines functions rloguniform

Documented in rloguniform

#' rloguniform
#'
#' @description Simulate a log-uniform distribution
#'
#' @param n number of sample
#' @param min minimum of the distribution
#' @param max maximum of the distribution
#'
#' @return A vector of simulated values
#' @export
#'
#' @examples
#' rloguniform(n = 1)
rloguniform <- function(n, min = 10^-1, max = 10^2){
  vec_simu <- runif(n = n,
                    min = log(min, base = 10),
                    max = log(max, base = 10))
  vec_pwr_10 <- 10^vec_simu
  return(vec_pwr_10)
}

Try the reservoirnet package in your browser

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

reservoirnet documentation built on April 4, 2023, 5:12 p.m.