Learn R Programming

autograph (version 0.1.2)

plot.diffusion: Plotting diffusion models

Description

Plotting diffusion models

Usage

# S3 method for diff_model
plot(x, ..., all_steps = TRUE)

# S3 method for diffs_model plot(x, ...)

# S3 method for learn_model plot(x, ...)

Value

plot.diff_model() returns a bar chart of the number of new infected nodes at each time point, as well as an overlay line plot of the total of infected

Arguments

x

A "diff_model" of "diffs_model" class of object. E.g. as a result from manynet::play_diffusion().

...

Other arguments to be passed.

all_steps

Whether all steps should be plotted or just those where there is change in the distributions.

Examples

Run this code
plot(res_manynet_diff)
plot(res_migraph_diff)
plot(play_learning(ison_networkers, beliefs = runif(net_nodes(ison_networkers))))

Run the code above in your browser using DataLab