Learn R Programming

OOmisc (version 1.2)

fact: A function to calculate the factorial.

Description

Calculates the factorial of a defined number.

Usage

fact(n)

Arguments

n
a numeric value for which the value of the factorial to be calculated.

Value

Returns a numeric value.

Details

n should be an integer.

References

Ilk, O. (2011). R Yazilimina Giris [Introduction to R Language]. ODTU Yayincilik [METU Press].

Examples

Run this code
fact(4)

Run the code above in your browser using DataLab