resize: Resizes a modelValues object

View source: R/all_utils.R

resizeR Documentation

Resizes a modelValues object

Description

Adds or removes rows to a modelValues object. If rows are added to a modelValues object, the default values are NA. Works in both R and NIMBLE.

Usage

resize(container, k)

Arguments

container

modelValues object

k

number of rows that modelValues is set to

Details

See the User Manual or help(modelValuesBaseClass) for infomation about modelValues objects

Author(s)

Clifford Anderson-Bergman

Examples

mvConf <- modelValuesConf(vars = c('a', 'b'),
             types = c('double', 'double'),
             sizes = list(a = 1, b = c(2,2) ) ) 
mv <- modelValues(mvConf)
as.matrix(mv)
resize(mv, 3)
as.matrix(mv)


nimble documentation built on Sept. 11, 2024, 7:10 p.m.