Learn R Programming

shp2graph (version 0-2)

ME.simplification: Simplify multiple edges in a network

Description

This function simplfies multiple-edge into one representative edge, where multiple-edge refers to a set of edges sharing with the same pair of nodes.

Usage

ME.simplification(nodelist, edgelist, eadf=NULL, ea.prop=NULL, Directed=F, 
                  DegreeL=NULL, InDegreeL=NULL, OutDegreeL=NULL,Nexception=NULL,
                  Eexception=NULL)

Arguments

nodelist

A “nodelist” object

edgelist

An “edgelist” object

eadf

Attribute data frame for all the edges, of which the number of rows equals to the number of edges;

ea.prop

a vector (of lenght equal to the number of columns in “eadf”) consisted of 1, 2, 3 or 4, and one value cooresponds to a kind of redefination function, see Redef.functions;

Directed

A logical parameter to specify whether edges are directed or not;

DegreeL

A vector (of length equal to the number of nodes) of degrees for the nodes, and it should be NULL if “Directed” is TRUE;

InDegreeL

A vector (of length equal to the number of nodes) of in-degrees for the nodes;

OutDegreeL

A vector of out-degrees for the nodes;

Nexception

A vector of node IDs considered as exceptions, and all the nodes included won't be processed;

Eexception

A vector of edge IDs considered as exceptions, and all the edges included won't be processed;

Value

Two types of list for “undirected” and “directed” edges respectively:

For “undirected” network:

newNodelist

The new nodelist with multiple-edges simplified;

newEdgelist

The new edgelist with multiple-edges simplified;

newEadf

The new attribute data frame for the returned edgelist;

DegreeL

The new degree vector cooresponding to the returned nodelist;

For directed network:
newNodelist

The new nodelist with multiple-edges simplified;

newEdgelist

The new edgelist with multiple-edges simplified;

newEadf

The new attribute data frame for the returned edgelist;

InDegreeL

The new in-degree vector cooresponding to the returned “nodelist”;

OutDegreeL

The new out-degree vector cooresponding to the returned “nodelist”;

See Also

SL.extraction, PN.amalgamation