add.gexf.node {rgexf}R Documentation

Adding and removing nodes/edges from gexf objects

Description

Manipulates gexf objects adding and removing nodes and edges from both, its dataframe representation and its XML representation.

Usage

add.gexf.node(graph, id=NA, label=NA, start=NULL, end=NULL,
   vizAtt=list(color=NULL, position=NULL, size=NULL, shape=NULL, image=NULL),
   atts=NULL)

add.gexf.edge(graph, source, target, id=NULL, type=NULL, label=NULL, start=NULL,
   end=NULL, weight=1, vizAtt = list(color=NULL, thickness=NULL, shape=NULL),
   atts=NULL, digits = getOption("digits"))

rm.gexf.node(graph, id=NULL, number=NULL, rm.edges = TRUE)

rm.gexf.edge(graph, id=NULL, number=NULL)

add.node.spell(graph, id=NULL, number=NULL, start=NULL, end=NULL,
   digits = getOption("digits"))

add.edge.spell(graph, id=NULL, number=NULL, start=NULL, end=NULL,
   digits = getOption("digits"))

Arguments

graph

A gexf-class object.

id

A node/edge id (normaly numeric value).

label

A node/edge label.

type

Type of conection (edge).

number

Index number(s) of a single or a group of nodes or edges.

weight

Edge weight.

vizAtt

A list of node/edge viz attributes (see write.gexf).

atts

List of attributes, currently ignored.

source

Source node's id.

target

Target node's id.

start

Starting time period

end

Ending time period

rm.edges

Whether to remove or not existing edges.

digits

Integer. Number of decimals to keep for nodes/edges sizes. See print.default

Details

new.gexf.graph Creates a new gexf empty object (0 nodes 0 edges).

add.gexf.node and add.gexf.edge allow adding nodes and edges to a gexf object (graph) one at a time. rm.gexf.node and rm.gexf.edges remove nodes and edges respectively.

In the case of rm.gexf.node, by default every edge linked to the node that is been removed will also be removed (rm.edges = TRUE).

add.node.spell and add.edge.spell allow to include spells to specific nodes or edges in a gexf object.

Value

A gexf object (see write.gexf).

Author(s)

George Vega Yon george.vega@nodoschile.org,

Jorge Fabrega Lacoa jorge.fabrega@nodoschile.org

References

The GEXF project website: http://gexf.net

Examples

  ## Not run: 
  demo(gexfbuildfromscratch)
  
## End(Not run)

[Package rgexf version 0.15.3 Index]