toString.parameter_VAR: parameter_VAR to string

View source: R/class_parameter_VAR.R

toString.parameter_VARR Documentation

parameter_VAR to string

Description

Convert an object of class 'parameter_VAR' into a ready-to-write vector of string

Usage

## S3 method for class 'parameter_VAR'
toString(x, ...)

Arguments

x

parameter_VAR object, object to be converted.

...

Optional arguments.

Value

A string ready to be printed or written.

Examples

X=data.frame(input1=rnorm(100),input2=rnorm(100))
Y=data.frame(output=X$input1+0.8*X$input2+0.1*rnorm(100))
VAR.indx=data.frame(indx=c(rep(1,50),rep(2,50)))
workspace=tempdir()
d <- dataset(X=X,Y=Y,data.dir=workspace,VAR.indx=VAR.indx)
p <- parameter_VAR(name='par',index='indx',d=d,
                   init=c(-1,1,2),
                   prior.dist=c('Gaussian','FlatPrior','Triangle'),
                   prior.par=list(c(-1,1),NULL,c(2,0,5)))
toString(p)

BaM-tools/RBaM documentation built on April 11, 2025, 10:01 p.m.