Learn R Programming

deal (version 1.2-4)

elementin: Is a network element in a list of networks?

Description

Sequentially check if the network is in the list.

Usage

elementin(nw,nwl)

Arguments

nw
an object of class network.
nwl
an object of class networkfamily.

Value

  • a logical. TRUE if nw is in nwl, else FALSE.

Details

Sequentially, the elements in nwl are compared to nw using nwequal. If this returns TRUE, then search is terminated and TRUE is returned. Otherwise, FALSE is returned.

References

Further information about deal can be found at: http://www.math.auc.dk/novo/deal.

See Also

nwequal,unique.networkfamily

Examples

Run this code
data(rats)
rats.nw  <- network(rats)
rats.prior <- jointprior(rats.nw,12)
rats.nw <- learn(rats.nw,rats,rats.prior)$nw
allrats <- networkfamily(rats,rats.nw,rats.prior)

elementin(rats.nw,allrats$nw)

Run the code above in your browser using DataLab