switch.edges: Switches between source and target

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/math.R

Description

Puts the lowest id node among every dyad as source (and the other as target)

Usage

1
switch.edges(edges)

Arguments

edges

A matrix or data frame structured as a list of edges

Details

edge.list transforms the input into a two-elements list containing a dataframe of nodes (with columns “id” and “label”) and a dataframe of edges. The last one is numeric (with columns “source” and “target”) and based on auto-generated nodes' ids.

Value

A list containing two data frames.

Author(s)

George Vega Yon

See Also

Other manipulation: check.dpl.edges()

Examples

1
2
3
4
  relations <- cbind(c(1,1,3,4,2,5,6), c(2,3,1,2,4,1,1))
  relations
  
  switch.edges(relations)

gvegayon/rgexf documentation built on Oct. 25, 2021, 4:21 p.m.