If necessary, convert an object to an MCMCState object.

as.MCMCState(s, ctx = NULL)

Arguments

s

a MCMCState or a MCMCStateVector object.

ctx

a MCMCContext object. This is needed only if s is MCMCStateVector object.

Value

an MCMCState object corresponding to s. If s is already a MCMCState object, it is returned as is. Otherwise, a MCMCState object is constructed from s and ctx.