Learn R Programming

greta (version 0.1.7)

greta-structures: greta Data Structures

Description

These structures can be used to set up more complex models. For example, scalar parameters can be embedded in a greta array by first creating a greta array with zeros() or ones(), and then embedding the parameter value using greta's replacement syntax

Usage

zeros(...)

ones(...)

Arguments

...
dimensions of the greta arrays to create

Value

a greta array object

Examples

Run this code
# a 3 row, 4 column greta array of 0s
z <- zeros(3, 4)

# a 3x3x3 greta array of 1s
z <- ones(3, 3, 3)

Run the code above in your browser using DataLab