rewriteHydeFormula: Rewrite HydeNetwork Graph Model Formula

Description Usage Arguments Details Author(s)

View source: R/rewriteHydeFormula.R

Description

This is a convenience function used to assist in the updating of HydeNetwork network objects. It makes it possible to add and subtract individual parent relationships without deleting an entire node.

Usage

1
rewriteHydeFormula(old_form, new_form)

Arguments

old_form

The current formula in a HydeNetwork object.

new_form

The formula specifications to be added

Details

To allow changes to be made on the node-parent level, the formulae are broken down into a vector of component where each element identifies a unique parent-child relationship. So if a node has representation nodeA | nodeB*nodeC, it will be broken down to nodeA | nodeB + nodeA | nodeC.

After decomposing the formulae, any instances of a component in form1 that are subtracted in form2 are removed.

Next, all added components in form2 that do not already exist in form1 are added.

Lastly, the parents of each node are combined and the specification of the network is written.

Author(s)

Jarrod Dalton and Benjamin Nutter


HydeNet documentation built on July 8, 2020, 5:15 p.m.