nimble (version 0.7.0)

resize: 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

Examples

Run this code
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab