Learn R Programming

simone (version 1.0-4)

coNetwork: Random perturbations of a reference network

Description

Simulates a network from another network object by randomly perturbing a given number of edges.

Usage


coNetwork(graph,
          delta,
          name = "a co-network")

Arguments

graph

an object of class simone.network (typically generated by the rNetwork function).

delta

an integer giving the number of edges to randomly remove AND add to graph in order to obtain a randomly perturbed network.

name

a character string indicating the name of the perturbed network.

Value

Returns an object of class simone.network, see rNetwork for further details.

See Also

rNetwork, plot.simone.network.

Examples

Run this code
# NOT RUN {
<!-- % -->
# }
# NOT RUN {
## ancestor and child network generation
ancestor <- rNetwork(p = 20, pi = 20, name = "ancestor")
child    <- coNetwork(ancestor, delta = 1, name = "child")

# network comparison
plot(ancestor, child)
# }

Run the code above in your browser using DataLab