R: Pascal Triangle

pascal {pracma} | R 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)

[Package pracma version 2.0.4 Index]