R/runifsphere.R

Defines functions runifsphere

Documented in runifsphere

#' @title Random number generation from unit sphere.
#' @description This function generates random numbers from p-dimensional unit sphere.
#'
#' @param n number of random samples.
#' @param p dimension of the unit sphere.
#'
#' @author Daniel Kosiorowski, Mateusz Bocian, Anna Wegrzynkiewicz and Zygmunt Zawadzki from Cracow University of Economics.
#'
#' @examples
#' 
#' x <- runifsphere(n = 100)
#' plot(x)
#' 
#' @export
#' 
runifsphere <- function(n, p = 2) {
  runifsphereCPP(n, p)
}
zzawadz/DepthProc documentation built on Feb. 4, 2022, 8:39 p.m.