mark_diff | R Documentation |
These functions return logical vectors the length of the nodes in a network identifying which hold certain properties or positions in the network.
node_is_infected()
marks nodes that are infected by a particular time point.
node_is_exposed()
marks nodes that are exposed to a given (other) mark.
node_is_latent()
marks nodes that are latent at a particular time point.
node_is_recovered()
marks nodes that are recovered at a particular time point.
node_is_latent(.data, time = 0)
node_is_infected(.data, time = 0)
node_is_recovered(.data, time = 0)
node_is_exposed(.data, mark)
.data |
An object of a manynet-consistent class:
|
time |
A time step at which nodes are identified. |
mark |
vector denoting which nodes are infected |
node_is_exposed()
is similar to node_exposure()
,
but returns a mark (TRUE/FALSE) vector indicating which nodes
are currently exposed to the diffusion content.
This diffusion content can be expressed in the 'mark' argument.
If no 'mark' argument is provided,
and '.data' is a diff_model object,
then the function will return nodes exposure to the seed nodes
in that diffusion.
Other marks:
mark_nodes
,
mark_select
,
mark_tie_select
,
mark_ties
,
mark_triangles
# To mark nodes that are latent by a particular time point
node_is_latent(play_diffusion(create_tree(6), latency = 1), time = 1)
# To mark nodes that are infected by a particular time point
node_is_infected(play_diffusion(create_tree(6)), time = 1)
# To mark nodes that are recovered by a particular time point
node_is_recovered(play_diffusion(create_tree(6), recovery = 0.5), time = 3)
# To mark which nodes are currently exposed
(expos <- node_is_exposed(manynet::create_tree(14), mark = c(1,3)))
which(expos)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.