diff --git a/R/lnfactorial.R b/R/lnfactorial.R deleted file mode 100644 index 542ea41494b2d828dd8c041af6b60795b70ffe03..0000000000000000000000000000000000000000 --- a/R/lnfactorial.R +++ /dev/null @@ -1,26 +0,0 @@ -lnfactorial <- function(n) { - #' Logarithm of the factorial - #' - #' Computes the logarithm of the factorial of a positive integer. - #' - #' @aliases lnfactorial - #' - #' @usage lnfactorial(n) - #' @param n positive integer. - #' @return Numeric value. The logarithm of the factorial. - #' @author Pierre Santagostini, Nizar Bouhlel - #' - #' @export - - if (n < 0) { - stop("n must be non negative") - } - - if (n == 0) { - return(0) - } - - if (n > 0) { - return(sum(log(1:n))) - } -}