Learn R Programming

rvec (version 0.0.7)

n_draw: 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)

# S3 method for default n_draw(x)

# S3 method for rvec n_draw(x)

Value

An integer scalar.

Arguments

x

An object that holds random draws, eg an rvec.

See Also

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

Examples

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

Run the code above in your browser using DataLab