stan_array: Create a StanArray object.

View source: R/main-declarations.R

stan_arrayR Documentation

Create a StanArray object.

Description

Create a StanArray object.

Usage

stan_array(name, dims, type = "real", lower = NULL, upper = NULL)

Arguments

name

name of the array

dims

list of array dimensions, must be a list of StanDimension objects

type

base type of the array

lower

lower bound

upper

upper bound

See Also

Other Stan variable declaration functions: stan_dim(), stan_matrix(), stan_param(), stan_transform(), stan_var(), stan_vector(), stan_vector_array()

Examples

N <- stan_dim("N")
M <- stan_dim("M")
my_arr <- stan_array("A", dims = list(N, N, M), lower = 0, type = "int")
print(my_arr)

jtimonen/odemodeling documentation built on Sept. 15, 2024, 4:29 a.m.