View source: R/main-declarations.R
stan_array | R Documentation |
Create a StanArray object.
stan_array(name, dims, type = "real", lower = NULL, upper = NULL)
name |
name of the array |
dims |
list of array dimensions, must be a list of
|
type |
base type of the array |
lower |
lower bound |
upper |
upper bound |
Other Stan variable declaration functions:
stan_dim()
,
stan_matrix()
,
stan_param()
,
stan_transform()
,
stan_var()
,
stan_vector()
,
stan_vector_array()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.