Skip to contents

Permutation of graph vertices

Usage

perm_vertices(
  vert_deg = NULL,
  k = 99,
  seed_n = NULL,
  vertex_sets = NULL,
  vertex_subsets = NULL,
  method = c("simple", "degree"),
  cut_par = 20,
  bin_type = c("number", "interval", "width")
)

Arguments

vert_deg

named vector of vertex degree

k

number of permutations.

seed_n

optional numeric; to specify the seed for (pseudo) random number generation; using the same seed

vertex_sets

optional list with subsets of names(vert_deg); each subset will be permuteted separately; this is useful when distinct sets of vertices have different meaning;

vertex_subsets

optional list with subsets of names(vert_deg); this will be used to check how many of these elements will fall into each permutation bin

method

method to perform permutation; "simple" permutes vertices only based on vertex sets; "degree" permutes vertices based on vertex_sets and vertex degree

cut_par

number of intervals or width of the intervals

bin_type

"interval" will use cut_interval(), "number" will use cut_number() while "width" will use cut_width() function from ggplot2

Value

list with k+1 vectors of permutations of names(vert_deg), where the first element of the list contains original names(vert_deg)