BindSARS: Bind a List of SARS Objects

Description Usage Arguments Value Examples

View source: R/base.R

Description

Bind a List of SARS Objects

Usage

1
BindSARS(sars_list, ids = NULL)

Arguments

sars_list

a list of SARS object to be combined

ids

a numeric vector (not a list!) for id of each SARS object

Value

a SARS object with an extra id vector as attributes

Examples

1
2
3
4
5
6
states <- matrix(c(1, 2, 3, 4), 2, 2)
actions <- matrix(c(1, 0), 2, 1)
rewards <- matrix(c(1, 2), 2, 1)
states_next <- matrix(c(2, 3, 4, 5), 2, 2)
ss <- SARS(states, actions, rewards, states_next)
BindSARS(list(ss, ss, ss))

XiaoqiLu/PhD-Thesis documentation built on March 1, 2021, 10:49 a.m.