log_factorial: A faster function to calculate log factorial of a...

Description Usage Arguments

View source: R/log_factorial.R

Description

This is a relatively faster function to calculate the log factorial of a non-negative integer n. If n = 1, the result is 0; if n <= 10000, the result is read from a pre-saved log factorial sheet; if n > 10000, use stirling's approximation.

Usage

1
log_factorial(logFactorialSheet, n, base)

Arguments

logFactorialSheet

A pre-saved csv file that contains log factorial for n <= 10000.

n

A non-negative integer.

base

The base of a logarithm.


kelvinyangli/mbmml documentation built on June 29, 2020, 3:12 a.m.