List the first n_nodes and n_edges of the gexf file.
Usage
# S3 method for class 'gexf'
head(x, n_nodes = 6L, n_edges = n_nodes, ...)Arguments
- x
An object of class gexf.
- n_nodes, n_edges
Integers. Number of nodes and edges to print
- ...
Ignored
Examples
fn <- system.file("gexf-graphs/lesmiserables.gexf", package = "rgexf")
g <- read.gexf(fn)
head(g, n_nodes = 5)
#> <?xml version="1.0" encoding="UTF-8"?>
#> <gexf xmlns="http://www.gexf.net/1.3" xmlns:viz="http://www.gexf.net/1.3/viz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.3" xsi:schemaLocation="http://www.gexf.net/1.3 http://www.gexf.net/1.3/gexf.xsd">
#> <meta lastmodifieddate="2016-11-09">
#> <creator>Gephi 0.9</creator>
#> <description/>
#> </meta>
#> <graph defaultedgetype="undirected" mode="static">
#> <attributes class="node" mode="static">
#> <attribute id="modularity_class" title="Modularity Class" type="integer"/>
#> </attributes>
#> <nodes>
#> <node id="11" label="Valjean">
#> <attvalues>
#> <attvalue for="modularity_class" value="1"/>
#> </attvalues>
#> <viz:size value="100.0"/>
#> <viz:position x="-87.93029" y="6.8120565"/>
#> <viz:color r="245" g="91" b="91"/>
#> </node>
#> <node id="48" label="Gavroche">
#> <attvalues>
#> <attvalue for="modularity_class" value="8"/>
#> </attvalues>
#> <viz:size value="61.600006"/>
#> <viz:position x="387.89572" y="-110.462326"/>
#> <viz:color r="91" g="245" b="91"/>
#> </node>
#> <node id="55" label="Marius">
#> <attvalues>
#> <attvalue for="modularity_class" value="6"/>
#> </attvalues>
#> <viz:size value="53.37143"/>
#> <viz:position x="206.44687" y="13.805411"/>
#> <viz:color r="194" g="91" b="245"/>
#> </node>
#> <node id="27" label="Javert">
#> <attvalues>
#> <attvalue for="modularity_class" value="7"/>
#> </attvalues>
#> <viz:size value="47.88571"/>
#> <viz:position x="-81.46074" y="204.20204"/>
#> <viz:color r="91" g="245" b="194"/>
#> </node>
#> <node id="25" label="Thenardier">
#> <attvalues>
#> <attvalue for="modularity_class" value="7"/>
#> </attvalues>
#> <viz:size value="45.142853"/>
#> <viz:position x="82.80825" y="203.1144"/>
#> <viz:color r="91" g="245" b="194"/>
#> </node>
#> ...
#> </nodes>
#> <edges>
#> <edge id="0" source="1" target="0"/>
#> <edge id="1" source="2" target="0" weight="8.0"/>
#> <edge id="2" source="3" target="0" weight="10.0"/>
#> <edge id="3" source="3" target="2" weight="6.0"/>
#> <edge id="4" source="4" target="0"/>
#> ...
#> </edges>
#> </graph>
#> </gexf>