Learn R Programming

NetworkInference (version 1.2.5)

plot.diffnet: Visualize netinf output

Description

Visualize the inferred diffusion network or the marginal gain in fit obtained by addition of each edge.

Usage

# S3 method for diffnet
plot(x, type = "network", ...)

Value

A ggplot plot object if type = "improvement" otherwise an igraph plot.

Arguments

x

object of class diffnet to be plotted.

type

character, one of c("network", "improvement", "p-value") indicating if the inferred diffusion network, the improvement for each edge or the p-value from the vuong test for each edge should be visualized .

...

additional arguments.

Details

If `type = improvement` a ggplot object is returned. It can be modified like any other ggplot. See the ggplot documentation and the examples in plot.cascade.

Examples

Run this code

if (FALSE) {
 data(cascades)
 res <- netinf(cascades, quiet = TRUE)
 plot(res, type = "network")
 plot(res, type = "improvement")
 plot(res, type = "p-value")
}

Run the code above in your browser using DataLab