Skip to contents

Convert numeric vectors, matrices, or arrays into a gretaR_array data node for use in model definitions. Data nodes are fixed (not sampled) during inference.

Usage

as_data(x)

Arguments

x

A numeric vector, matrix, or array of observed data.

Value

A gretaR_array representing fixed (observed) data.

Examples

if (FALSE) { # \dontrun{
y <- as_data(iris$Sepal.Length)
X <- as_data(matrix(rnorm(30), ncol = 3))
} # }