modelValuesSpec: Create the specs for a custom NIMBLE modelValues Object

Description Usage Arguments Details Author(s) Examples

Description

Builds an R-based modelValues spec object

Usage

1
2
modelValuesSpec(symTab, className, vars, types, sizes, modelDef = NA,
  where = globalenv())

Arguments

vars

A vector of character strings naming each variable in the modelValues object

types

A vector of character strings describing the type of data for the modelValues object. Options include ‘double’ (for real-valued variables) and ‘int’.

sizes

A list in which the named items of the list match the var arguments and each item is a numeric vector of the dimensions

symTab

For internal use only

className

For internal use only

where

For internal use only

Details

See the User Manual or help(modelValuesBaseClass) and help(modelValues) for information

Author(s)

Clifford Anderson-Bergman

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#Custom modelValues object:
mvSpec <- modelValuesSpec(vars = c('x', 'y'),
				types = c('double', 'int'),
				sizes = list(x = 3, y = c(2,2)))
custom_mv <- modelValues(mvSpec, m = 2)
custom_mv['y',]
[[1]]
     [,1] [,2]
[1,]   NA   NA
[2,]   NA   NA

[[2]]
     [,1] [,2]
[1,]   NA   NA
[2,]   NA   NA

thirdwing/nimble documentation built on May 31, 2019, 10:41 a.m.