Skip to contents

[Deprecated]

as.undirected() was renamed to as_undirected() to create a more consistent API.

Usage

as.undirected(
  graph,
  mode = c("collapse", "each", "mutual"),
  edge.attr.comb = igraph_opt("edge.attr.comb")
)

Arguments

graph

The graph to convert.

mode

Character constant, defines the conversion algorithm. For as_directed() it can be mutual or arbitrary. For as_undirected() it can be each, collapse or mutual. See details below.

edge.attr.comb

Specifies what to do with edge attributes, if mode="collapse" or mode="mutual". In these cases many edges might be mapped to a single one in the new graph, and their attributes are combined. Please see attribute.combination() for details on this.