rgexf Methods {rgexf} | R Documentation |
gexf
objects
Methods to print and summarize gexf
class objects
## S3 method for class 'gexf' print(x, file=NA, replace=F, ...) ## S3 method for class 'gexf' summary(object, ...) ## S3 method for class 'gexf' plot(x, EdgeType = c("curve", "line"), output.dir = NULL, ...)
x |
An |
object |
An |
file |
String. Output path where to save the GEXF file. |
replace |
Logical. If |
EdgeType |
For the visualization |
output.dir |
String. The complete path where to export the sigmajs visualization |
... |
Ignored |
print.gexf
displays the graph (XML) in the console. If file
is
not NA
, a GEXF file will be exported to the indicated filepath.
summay.gexf
prints summary statistics and information about the graph.
plot.gexf
plots the graph object in the web browser using sigma-js
javascript library. Generated files are stored at the OS's “temp”
folder. If output.dir
is not NULL
, then all files required
to display the graph in the web browser will be saved in the output.dir
.
Users must note that plot.gexf
starts a server using the Rook
package, otherwise it will not be possible to see the visualization (sigmajs
requires this).
to
|
None (invisible |
|
List containing some |
|
None (invisible |
George Vega Yon george.vega@nodoschile.org,
Joshua B. Kunst jbkunst@nodoschile.org
sigmajs project website http://sigmajs.org/.
See also write.gexf
## Not run: # Data frame of nodes people <- data.frame(id=1:4, label=c("juan", "pedro", "matthew", "carlos"), stringsAsFactors=F) # Data frame of edges relations <- data.frame(source=c(1,1,1,2,3,4,2,4,4), target=c(4,2,3,3,4,2,4,1,1)) # Building gexf graph mygraph <- write.gexf(nodes=people, edges=relations) # Summary and pring summary(mygraph) print(mygraph, file="mygraph.gexf", replace=T) # Plotting plot(mygraph) ## End(Not run)