as.stan: Convert an object to stanfit

View source: R/as_stan.R

as.stanR Documentation

Convert an object to stanfit

Description

Create a stanfit object from an object for which a method exists, so that all methods for stanfit objects can be used.

Usage

as.stan(x, ...)

Arguments

x

An object for which a method exists.

...

Arguments passed to or from other methods.

Value

An object of class stanfit, as documented in rstan::stan.

Examples

stanfit <- "a"
class(stanfit) <- "stanfit"
converted <- as.stan(stanfit)

pema documentation built on March 31, 2023, 11:38 p.m.