pascal: Pascal Triangle

View source: R/pascal.R

pascalR Documentation

Pascal Triangle

Description

Pascal triangle in matrix format

Usage

pascal(n, k = 0)

Arguments

n

natural number

k

natural number, k <= n

Details

Pascal triangle with k variations.

Value

matrix representing the Pascal triangle

See Also

nchoosek

Examples

pascal(5)
pascal(5, 1)
pascal(5, 2)

pracma documentation built on March 19, 2024, 3:05 a.m.