rbinom_matrix_vec: Generate a matrix of binomial random values

View source: R/RcppExports.R

rbinom_matrix_vecR Documentation

Generate a matrix of binomial random values

Description

Create a matrix of size nrows by ncols where each column j uses its own success probability probs j.

Usage

rbinom_matrix_vec(nrows, ncols, probs)

Arguments

nrows

Integer, number of rows.

ncols

Integer, number of columns.

probs

Numeric vector of length ncols, column-wise success probabilities in (0, 1).

Value

IntegerMatrix of dimension nrows by ncols.

Examples

set.seed(1)
rbinom_matrix_vec(5, 3, rep(0.3, 3))

bunsen documentation built on Sept. 3, 2026, 5:09 p.m.