n_draw: Query Number of Draws

View source: R/n_draw.R

n_drawR Documentation

Query Number of Draws

Description

Get a count of the random draws held by x. If x does not hold random draws, then n_draw() throws an error.

Usage

n_draw(x)

## Default S3 method:
n_draw(x)

## S3 method for class 'rvec'
n_draw(x)

Arguments

x

An object that holds random draws, eg an rvec.

Value

An integer scalar.

See Also

  • is_rvec() to test if an object is an rvec.

Examples

m <- matrix(1:40, nrow = 4, ncol = 10)
x <- rvec(m)
n_draw(x)

rvec documentation built on Aug. 8, 2025, 7:29 p.m.