Learn R Programming

VeryLargeIntegers (version 0.1.8)

06. Binomial coefficients: Binomial Coefficients for vli Objects

Description

binom computes binomial coefficients of vli (Very Large Integer) objects. That is, given two positive integers n and k with n >= k, the function binom(n, k) returns the number of ways to choose a subset of k elements, disregarding their order, from a set of n elements.

Usage

binom(n, k)

# S3 method for default binom(n, k)

# S3 method for numeric binom(n, k)

# S3 method for vli binom(n, k)

Value

object of class vli

Arguments

n

object of class vli or 32 bits integer

k

object of class vli or 32 bits integer

Author

Javier Leiva Cuadrado

Examples

Run this code
x <- as.vli("100")
binom(x, 20)

Run the code above in your browser using DataLab