set.table {gRaven} | R Documentation |
Set or get CPT in a gRaven domain
Description
Set or get CPT in a gRaven domain
Usage
set.table(domain, n, tab = 1, type = c("cpt", "experience",
"fading"))
get.table(domain, n, type = c("cpt", "experience",
"fading"), class = c("data.frame", "table",
"ftable", "numeric"))
Arguments
domain |
name of gRaven domain |
n |
name of node |
tab |
values of conditional probabilties |
type |
a character string specifying the type of table to set. |
class |
a character string specifying the class of the returned table |
Value
For set.table
, a NULL value is invisibly returned; for get.table
, an object of required class.
Differences from RHugin
Only type="cpt" and class="data.frame" are currently implemented in gRaven
.
Author(s)
Peter J. Green, P.J.Green@bristol.ac.uk
Examples
chest<-hugin.domain()
add.node(chest,"asia",states=c("yes","no"))
add.node(chest,"tub",states=c("yes","no"))
add.edge(chest,"tub","asia")
compile(chest)
chest
get.table(chest,"asia")
set.table(chest,"asia",c(0.01,0.99))
get.table(chest,"asia")
[Package gRaven version 1.1.8 Index]