create_infomap_linklist: Create a link list for Infomap

View source: R/create_infomap_linklist.R

create_infomap_linklistR Documentation

Description

Takes a monolayer object and returns a link list and a tibble with nodes.

Usage

create_infomap_linklist(
  x,
  make_directed = F,
  write_to_file = F,
  output_file = "infomap_link_list.txt"
)

Arguments

x

A monolayer object created with create_monolayer_network.

make_directed

for undirected networks, create two sets of edges.

write_to_file

write the link list into a file?

output_file

the name of the output file (default is 'infomap_link_list.txt')

Details

Used internally by run_infomap_monolayer, but also useful for writing the link list to a file.

Value

An object of class infomap_link_list, which is an R list with:

  • edge_list_infomap A link list (format: from, to, weight) formatted for Infomap, with node IDs

  • nodes A tibble with node IDs, names and possibly other attributes.

See Also

infomap_link_list

Examples

network_object <- create_monolayer_network(bipartite::memmott1999,
 bipartite = TRUE, directed = FALSE, group_names = c('A','P'))
 
x <- create_infomap_linklist(network_object, make_directed = FALSE, 
write_to_file = FALSE)


Ecological-Complexity-Lab/infomap_ecology_package documentation built on June 6, 2024, 5:28 a.m.