Learn R Programming

nimble (version 1.2.1)

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

Author

Clifford Anderson-Bergman

Details

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

Examples

Run this code
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