split_behaviors {netdiffuseR} | R Documentation |
Splitting behaviors
Description
Split each behavior within multi-diffusion diffnet object. The function gets
toa
, adopt
, cumadopt
, and the behavior
name from
each behavior, and returns a list where each element is a single behavior.
All the rest of the structure remains the same for each element in the list.
Usage
split_behaviors(diffnet_obj)
Arguments
diffnet_obj |
A multi-diffusion diffnet object. |
Value
A list of diffnet objects. Each element represent a unique behavior.
Author(s)
George G. Vega Yon & AnĂbal Olivera M.
Examples
# Running a multi-diffusion simulation
set.seed(1231)
diffnet_multi <- rdiffnet(50, 5, seed.p.adopt = list(0.1,0.1))
diffnet_multi_list <- split_behaviors(diffnet_multi)
diffnet_single <- diffnet_multi_list[[1]]
# You can now run standard functions for a single behavior
# Plotting single behavior
plot_diffnet(diffnet_single, slices = c(1, 3, 5))
[Package netdiffuseR version 1.23.0 Index]