R: Resizes a modelValues object

resize {nimble} | R 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)

[Package nimble version 0.9.1 Index]