Usage
node (idx,parents,type="discrete",name=paste(idx),
levels=2,levelnames=paste(1:levels),position=c(0,0))
## S3 method for class 'node':
print (x,filename=NA,condposterior=TRUE,condprior=TRUE,...)
## S3 method for class 'node':
plot (x,cexscale=10,notext=FALSE,...)
prob.node (x,nw,df)
nodes(nw)
"nodes<-"(nw,value)Arguments
x
an object of class node.
parents
a numeric vector with indices of the parents of the node.
idx
an integer, which gives the index of the node (the column number of the
corresponding data frame).
type
a string, which gives the type of the node. Either
"discrete" (for factors) or "continuous" (for numeric).
name
a string, which gives the name used when plotting and
printing. Defaults to the column
name in the data frame.
levels
an integer. If type is "discrete", this is
the number of levels for the discrete variable.
levelnames
if type is "discrete", this is a vector of
strings (same length as levels) with the names of the
levels. If type is "continuous", the argument is ignored.
position
a numeric vector with coordinates where the node should
appear in the
plot. Usually set by network and drawnetwork. df
a data frame, where the columns define the variables. A
continuous variable should have type numeric and discrete varibles
should have type factor. value
a list of elements of class node. filename
a string or NA. If not NA, output is
printed to a file.
condprior
a logical. If TRUE, the conditional prior is
printed, see conditional. condposterior
a logical. If TRUE, the conditional posterior is
printed, see learn. cexscale
a numeric. Scale parameter to set the size of the nodes.
notext
a logical. If TRUE, no text is displayed in the nodes on the plot.
...
additional plot arguments.