Learn R Programming

RBaM (version 1.1.1)

toString.parameter_VAR: parameter_VAR to string

Description

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

Usage

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

Value

A string ready to be printed or written.

Arguments

x

parameter_VAR object, object to be converted.

...

Optional arguments.

Examples

Run this code
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)

Run the code above in your browser using DataLab