NetworkSetPriority {RNetica} | R Documentation |
Netica sets the visual appearance (i.e., colour, see
NetworkNodeSetColor()
) of a node according to highest
priority set to which the node belongs. This function changes the
order of priority.
NetworkSetPriority(net, setlist)
net |
An active |
setlist |
A character vector containing a subset of the node set names. The first ones in the sequence will have the highest priority. |
Netica determines the visual style of a node by stepping through the
node sets to which the node belongs in priority order. Each node set
can either have a colour set, or a flag set to indicate that the next
node in order or priority should be used to determine the appearance
of the node (see NetworkNodeSetColor()
).
This function switches the priority of the node sets names in the
second argument. The node sets note mentioned in setlist
are
not affected.
Returns the net
argument invisibly.
The priority of the Netica internal node sets (the ones beginning with ‘:’) are set by Netica and cannot be changed. They all have lower priority than the user-defined node sets.
Russell Almond
http://norsys.com/onLurl/Manual/index.html: ReorderNodesets_bn(), SetNodesetColor_bn()
NeticaNode
, NodeSets()
,
NetworkNodeSets()
,
NetworkNodesInSet()
, NetworkNodeSetColor()
sess <- NeticaSession() startSession(sess) nsnet <- CreateNetwork("NodeSetExample", session=sess) Ability <- NewContinuousNode(nsnet,"Ability") EssayScore <- NewDiscreteNode(nsnet,"EssayScore",paste("level",5:0,sep="_")) Value <- NewContinuousNode(nsnet,"Value") NodeKind(Value) <- "Utility" Placement <- NewDiscreteNode(nsnet,"Placement", c("Advanced","Regular","Remedial")) NodeKind(Placement) <- "Decision" NodeSets(EssayScore) <- c("ReportingVariable","Observable") NetworkSetPriority(nsnet,c("Observable","ReportingVariable")) ## Now EssayScore should be coloured like an observable. stopifnot( NodeSets(EssayScore) == c("Observable","ReportingVariable")) NetworkSetPriority(nsnet,c("ReportingVariable","Observable")) ## Now EssayScore should be coloured like a Reporting Variable stopifnot( NodeSets(EssayScore) == c("ReportingVariable","Observable")) DeleteNetwork(nsnet) stopSession(sess)