manip_permutation function

Network permutation

Network permutation

to_permuted() permutes the network using a Fisher-Yates shuffle on both the rows and columns (for a one-mode network) or on each of the rows and columns (for a two-mode network).

to_permuted(.data, with_attr = TRUE)

Arguments

  • .data: An object of a manynet-consistent class:

    • matrix (adjacency or incidence) from {base} R
    • edgelist, a data frame from {base} R or tibble from {tibble}
    • igraph, from the {igraph} package
    • network, from the {network} package
    • tbl_graph, from the {tidygraph} package
  • with_attr: Logical whether any attributes of the object should be retained. By default TRUE.

Examples

graphr(ison_adolescents, node_size = 4) graphr(to_permuted(ison_adolescents), node_size = 4)

See Also

Other modifications: manip_as, manip_correlation, manip_deformat, manip_from, manip_levels, manip_miss, manip_nodes, manip_paths, manip_preformat, manip_project, manip_reformat, manip_scope, manip_split, manip_ties

  • Maintainer: James Hollway
  • License: MIT + file LICENSE
  • Last published: 2024-11-05