nsimplex: Computes the number of points on a (p, n)-simplex lattice

Description Usage Arguments Value Examples

Description

Computes the number of points on a (p, n)-simplex lattice; that is, the number of p-part compositions of n. This gives the number of points in the support space of a Multinomial(n, q) distribution, where p == length(q).

Arguments p and n are replicated as necessary to have the length of the longer of them.

Usage

1
nsimplex(p, n)

Arguments

p

vector of integers

n

vector of integers

Value

integer

Examples

1
nsimplex(3,5)

Example output

Attaching package: 'combinat'

The following object is masked from 'package:utils':

    combn

[1] 21

combinat documentation built on May 2, 2019, 5:57 a.m.

Related to nsimplex in combinat...