Learn R Programming

BRugs (version 0.9-2.1)

samplesCoda: Writing files in CODA format

Description

This function writes files in CODA format to be processed or imported, e.g, by some other software.

Usage

samplesCoda(node, stem, beg = samplesGetBeg(), 
    end = samplesGetEnd(), firstChain = samplesGetFirstChain(), 
    lastChain = samplesGetLastChain(), thin = samplesGetThin())

Value

Prints ‘CODA files written’.

Arguments

node

Character vector of length 1, name of a variable in the model.

stem

The filestem of the CODA files to be generated. See details.

beg, end

Arguments to select a slice of monitored values corresponding to iterations beg:end.

firstChain, lastChain

Arguments to select a sub group of chains.

thin

to only use every thin-th value of the stored sample.

Details

Example for argument stem: If stem = "c:/myFolder/foo", the resulting files are called fooCODAchain1.txt, ..., fooCODAchainN.txt, and fooCODAindex.txt. They are written into the tempdir() and copied to the path "c:/myFolder".

If the variable of interest is an array, slices of the array can be selected using the notation variable[lower0:upper0, lower1:upper1, ...].

If the arguments are left at their defaults the whole sample for all chains will be used for output.

See Also

BRugs, help.WinBUGS