shp2graph (version 0-5)

SL.extraction: Extract self-loops form given network

Description

A function to extract self-loops away in given network.

Usage

SL.extraction(nodelist, edgelist, eadf=NULL,Directed=F, DegreeL=NULL, 
              InDegreeL=NULL, OutDegreeL=NULL,Nexception=NULL,Eexception=NULL)

Arguments

nodelist

A “nodelist” object;

edgelist

An “edgelist” object

eadf

A data frame of attributes corresponding to all the edges;

Directed

TRUE if edges are directed, FALSE otherwise;

DegreeL

DegreeL

InDegreeL

An integer vector of In-degrees for each node in the given “nodelist”, and it could be ignored if edges are undirected

OutDegreeL

An integer vector of Out-degrees for each node in the given “nodelist”, and it could be ignored if edges are undirected

Nexception

A vector of node IDs concerned as exceptions, and all the edges with these nodes included won't be processed;

Eexception

A vector of edge IDs concerned as exceptions, and all these edges won't be processed;

Value

Two types of list returned for undirected and directed edges, respectively:

For “undirected” edges:

newNodelist

New node list with self-loops removed;

newEdgelist

New edge list with self-loops removed;

newEadf

New attribute data frame for the returned edgelist;

DegreeL

New degree vector cooresponding to the newly returned node list;

For directed network:
newNodelist

New node list with self-loops removed;

newEdgelist

New edgelist with self-loops removed;

newEadf

Data frame of attributes for the newly returned edge list;

InDegreeL

New In-degree vector cooresponding to the newly returned node list;

OutDegreeL

New Out-degree vector cooresponding to the newly returned node list;

See Also

PN.amalgamation, ME.simplification