Learn R Programming

fixedTimeEvents (version 1.0.1)

facL: Approximated logarithm of factorials

Description

Stirling's 2nd order approximation of the logarithm of a factorial.

Usage

facL(n)

Arguments

n

vector of integers for which to compute the logarithmic factorial.

Value

The logarithm of the factorial.

References

Liland, KH & Snipen, L, FixedTimeEvents: An R package for the distribution of distances between discrete events in fixed time, SoftwareX 5 (2016).

See Also

dLiland, Liland, Liland.test, simLiland

Examples

Run this code
# NOT RUN {
# Some values of the logarithm of factorials.
facL( c(2,10,100,1000) )
log( factorial( c(2,10,100,1000) ) )

# Fraction of two factorials
exp( facL(200)-facL(180) )
factorial(200)/factorial(180)
# }

Run the code above in your browser using DataLab