R Programming/Network Analysis

From Wikibooks, open books for an open world
Jump to: navigation, search

[edit] Introduction

We mainly use following packages to demontrate network analysis in R: statnet, sna, igraph. They are however not representing a complete list. See Task view of gR, graphical models in R for a complete list.

[edit] Creating simple graphs with igraph

 
> # load the appropriate library
> library(igraph)
> # now create a few simple graphs
> g <- graph.empty(10,directed=FALSE)
> g2 <- graph.ring(10,directed=TRUE)
> g3 <- graph.full(10,directed=FALSE)
> # now get information about these graphs
> summary(g)

[edit] References

Previous: Factor Analysis Index
Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export