run_att_swap_sims: run_att_swap_sims

View source: R/run_att_swap.R

run_att_swap_simsR Documentation

run_att_swap_sims

Description

run_att_swap_sims

Usage

run_att_swap_sims(
  net_to_swap,
  attribute,
  swaps = 10000,
  sims = 50,
  cores = 1L,
  save_preface = NA,
  save_dir = "./network_sims",
  verbose = FALSE
)

Arguments

net_to_swap

An object of type network. Passed to net_att_swap.

attribute

A pre-defined attribute within net_to_swap. Passed to net_attr_swap.

swaps

Integer. Passed to net_attr_swap. Defaults to 10000.

sims

How many simulated networks to generate. Each will be saved as an .rda file within save_dir. Defaults to 50.

cores

Integer. How many cores to use. Defaults to 1.

save_preface

Character. What to preface the above simulations with when saved. Defaults to sim.

save_dir

A directory filepath. Where the individual network simulations and cumulative dataframe will be saved. Defaults to ./network_sims. Only used if save_preface is not NA.

verbose

Logical. Should the code print more verbose progress messages. Defaults to FALSE.

Value

A list containing the original network with network metrics and all simulations.


Epsian/nattswap documentation built on March 29, 2022, 4:27 a.m.