sna: Tools for Social Network Analysis

A range of tools for social network analysis, including node and graph-level indices, structural distance and covariance methods, structural equivalence detection, network regression, random graph generation, and 2D/3D network visualization.

AuthorCarter T. Butts [aut, cre, cph]
Date of publication2016-08-08 09:36:22
MaintainerCarter T. Butts <>
LicenseGPL (>= 2)

View on CRAN

Man pages

add.isolates: Add Isolates to a Graph

bbnam: Butts' (Hierarchical) Bayesian Network Accuracy Model Estimate Bayes Factors for the bbnam

betweenness: Compute the Betweenness Centrality Scores of Network...

bicomponent.dist: Calculate the Bicomponents of a Graph

blockmodel: Generate Blockmodels Based on Partitions of Network Positions

blockmodel.expand: Generate a Graph (or Stack) from a Given Blockmodel Using...

bn: Fit a Biased Net Model

bonpow: Find Bonacich Power Centrality Scores of Network Positions

brokerage: Perform a Gould-Fernandez Brokerage Analysis

centralgraph: Find the Central Graph of a Labeled Graph Stack

centralization: Find the Centralization of a Given Network, for Some Measure...

clique.census: Compute Cycle Census Information

closeness: Compute the Closeness Centrality Scores of Network Positions

coleman: Coleman's High School Friendship Data

component.dist: Calculate the Component Size Distribution of a Graph

components: Find the Number of (Maximal) Components Within a Given Graph

component.size.byvertex: Get Component Sizes, by Vertex

connectedness: Compute Graph Connectedness Scores

consensus: Estimate a Consensus Structure from Multiple Observations

cugtest: Perform Conditional Uniform Graph (CUG) Hypothesis Tests for...

cug.test: Univariate Conditional Uniform Graph Tests

cutpoints: Identify the Cutpoints of a Graph or Digraph

degree: Compute the Degree Centrality Scores of Network Positions

diag.remove: Remove the Diagonals of Adjacency Matrices in a Graph Stack

dyad.census: Compute a Holland and Leinhardt MAN Dyad Census

efficiency: Compute Graph Efficiency Scores

ego.extract: Extract Egocentric Networks from Complete Network Data

equiv.clust: Find Clusters of Positions Based on an Equivalence Relation

eval.edgeperturbation: Compute the Effects of Single-Edge Perturbations on...

evcent: Find Eigenvector Centrality Scores of Network Positions

event2dichot: Convert an Observed Event Matrix to a Dichotomous matrix

flowbet: Calculate Flow Betweenness Scores of Network Positions

gapply: Apply Functions Over Vertex Neighborhoods

gclust.boxstats: Plot Statistics Associated with Graph Clusters

gclust.centralgraph: Get Central Graphs Associated with Graph Clusters

gcor: Find the (Product-Moment) Correlation Between Two or More...

gcov: Find the Covariance(s) Between Two or More Labeled Graphs

gden: Find the Density of a Graph

gdist.plotdiff: Plot Differences in Graph-level Statistics Against...

gdist.plotstats: Plot Various Graph Statistics Over a Network MDS

geodist: Fund the Numbers and Lengths of Geodesics Among Nodes in a...

gilschmidt: Compute the Gil-Schmidt Power Index

gliop: Return a Binary Operation on GLI Values Computed on Two...

gplot: Two-Dimensional Visualization of Graphs

gplot3d: Three-Dimensional Visualization of Graphs

gplot3d.arrow: Add Arrows a Three-Dimensional Plot

gplot3d.layout: Vertex Layout Functions for gplot3d

gplot3d.loop: Add Loops to a Three-Dimensional Plot

gplot.arrow: Add Arrows or Segments to a Plot

gplot.layout: Vertex Layout Functions for gplot

gplot.loop: Add Loops to a Plot Display a Graph in Target Diagram Form

gplot.vertex: Add Vertices to a Plot

graphcent: Compute the (Harary) Graph Centrality Scores of Network...

grecip: Compute the Reciprocity of an Input Graph or Graph Stack

gscor: Find the Structural Correlations Between Two or More Graphs

gscov: Find the Structural Covariance(s) Between Two or More Graphs

gt: Transpose an Input Graph

gtrans: Compute the Transitivity of an Input Graph or Graph Stack

gvectorize: Vectorization of Adjacency Matrices

hdist: Find the Hamming Distances Between Two or More Graphs

hierarchy: Compute Graph Hierarchy Scores

infocent: Find Information Centrality Scores of Network Positions

interval.graph: Convert Spell Data to Interval Graphs

is.connected: Is a Given Graph Connected?

is.isolate: Is Ego an Isolate?

isolates: List the Isolates in a Graph or Graph Stack

kcores: Compute the k-Core Structure of a Graph

lab.optimize: Optimize a Bivariate Graph Statistic Across a Set of...

lnam: Fit a Linear Network Autocorrelation Model

loadcent: Compute the Load Centrality Scores of Network Positions

lower.tri.remove: Remove the Lower Triangles of Adjacency Matrices in a Graph...

lubness: Compute Graph LUBness Scores

make.stochastic: Make a Graph Stack Row, Column, or Row-column Stochastic

maxflow: Calculate Maximum Flows Between Vertices

mutuality: Find the Mutuality of a Graph

nacf: Sample Network Covariance and Correlation Functions

neighborhood: Compute Neighborhood Structures of Specified Order

netcancor: Canonical Correlation for Labeled Graphs

netlm: Linear Regression for Network Data

netlogit: Logistic Regression for Network Data

npostpred: Take Posterior Predictive Draws for Functions of Networks

nties: Find the Number of Possible Ties in a Given Graph or Graph...

numperm: Get the nth Permutation Vector by Periodic Placement

path.census: Compute Path or Cycle Census Information

plot.bbnam: Plotting for bbnam Objects

plot.blockmodel: Plotting for blockmodel Objects

plot.cugtest: Plotting for cugtest Objects

plot.equiv.clust: Plot an equiv.clust Object

plot.lnam: Plotting for lnam Objects

plot.qaptest: Plotting for qaptest Objects

plot.sociomatrix: Plot Matrices Using a Color/Intensity Grid

potscalered.mcmc: Compute Gelman and Rubin's Potential Scale Reduction Measure...

prestige: Calculate the Vertex Prestige Scores

print.bayes.factor: Printing for Bayes Factor Objects

print.bbnam: Printing for bbnam Objects

print.blockmodel: Printing for blockmodel Objects

print.cugtest: Printing for cugtest Objects

print.lnam: Printing for lnam Objects

print.netcancor: Printing for netcancor Objects

print.netlm: Printing for netlm Objects

print.netlogit: Printing for netlogit Objects

print.qaptest: Printing for qaptest Objects

print.summary.bayes.factor: Printing for summary.bayes.factor Objects

print.summary.bbnam: Printing for summary.bbnam Objects

print.summary.blockmodel: Printing for summary.blockmodel Objects

print.summary.cugtest: Printing for summary.cugtest Objects

print.summary.lnam: Printing for summary.lnam Objects

print.summary.netcancor: Printing for summary.netcancor Objects

print.summary.netlm: Printing for summary.netlm Objects

print.summary.netlogit: Printing for summary.netlogit Objects

print.summary.qaptest: Printing for summary.qaptest Objects

pstar: Fit a p*/ERG Model Using a Logistic Approximation

qaptest: Perform Quadratic Assignment Procedure (QAP) Hypothesis Tests...

reachability: Find the Reachability Matrix of a Graph Read Graphviz DOT Files

read.nos: Read (N)eo-(O)rg(S)tat Input Files

redist: Find a Matrix of Distances Between Positions Based on Regular...

rgbn: Draw from a Skvoretz-Fararo Biased Net Process

rgnm: Draw Density-Conditioned Random Graphs

rgnmix: Draw Mixing-Conditioned Random Graphs

rgraph: Generate Bernoulli Random Graphs

rguman: Draw Dyad Census-Conditioned Random Graphs

rgws: Draw From the Watts-Strogatz Rewiring Model

rmperm: Randomly Permute the Rows and Columns of an Input Matrix

rperm: Draw a Random Permutation Vector with Exchangeability...

sdmat: Estimate the Structural Distance Matrix for a Graph Stack

sedist: Find a Matrix of Distances Between Positions Based on...

sna: Tools for Social Network Analysis

sna-coercion: sna Coercion Functions

sna-defunct: Defunct sna Objects

sna-deprecated: Deprecated Functions in sna Package

sna-internal: Internal sna Functions

sna.operators: Graphical Operators

sr2css: Convert a Row-wise Self-Report Matrix to a CSS Matrix with...

stackcount: How Many Graphs are in a Graph Stack?

stresscent: Compute the Stress Centrality Scores of Network Positions

structdist: Find the Structural Distances Between Two or More Graphs

structure.statistics: Compute Network Structure Statistics

summary.bayes.factor: Detailed Summaries of Bayes Factor Objects

summary.bbnam: Detailed Summaries of bbnam Objects

summary.blockmodel: Detailed Summaries of blockmodel Objects

summary.cugtest: Detailed Summaries of cugtest Objects

summary.lnam: Detailed Summaries of lnam Objects

summary.netcancor: Detailed Summaries of netcancor Objects

summary.netlm: Detailed Summaries of netlm Objects

summary.netlogit: Detailed Summaries of netlogit Objects

summary.qaptest: Detailed Summaries of qaptest Objects

symmetrize: Symmetrize an Adjacency Matrix

triad.census: Compute the Davis and Leinhardt Triad Census

triad.classify: Compute the Davis and Leinhardt Classification of a Given...

upper.tri.remove: Remove the Upper Triangles of Adjacency Matrices in a Graph...

write.dl: Write Output Graphs in DL Format

write.nos: Write Output Graphs in (N)eo-(O)rg(S)tat Format

Files in this package

sna/R/gtest.R sna/R/roles.R sna/R/models.R sna/R/gli.R sna/R/gmultiv.R sna/R/connectivity.R sna/R/fileio.R sna/R/visualization.R sna/R/randomgraph.R sna/R/dataprep.R sna/R/nli.R sna/R/sna-operators.R sna/R/permutation.R sna/R/zzz.R
sna/man/print.summary.blockmodel.Rd sna/man/plot.bbnam.Rd sna/man/ego.extract.Rd sna/man/cugtest.Rd sna/man/add.isolates.Rd sna/man/rgnm.Rd sna/man/flowbet.Rd sna/man/summary.lnam.Rd sna/man/cug.test.Rd sna/man/ sna/man/numperm.Rd sna/man/structure.statistics.Rd sna/man/centralization.Rd sna/man/rgbn.Rd sna/man/sna.Rd sna/man/sr2css.Rd sna/man/gdist.plotdiff.Rd sna/man/bbnam.Rd sna/man/gclust.centralgraph.Rd sna/man/netlm.Rd sna/man/gplot3d.loop.Rd sna/man/stackcount.Rd sna/man/print.summary.netcancor.Rd sna/man/summary.bayes.factor.Rd sna/man/sedist.Rd sna/man/sna-deprecated.Rd sna/man/gplot.vertex.Rd sna/man/diag.remove.Rd sna/man/gplot3d.layout.Rd sna/man/triad.classify.Rd sna/man/gclust.boxstats.Rd sna/man/summary.cugtest.Rd sna/man/netcancor.Rd sna/man/rmperm.Rd sna/man/pstar.Rd sna/man/write.nos.Rd sna/man/print.netlogit.Rd sna/man/sdmat.Rd sna/man/gplot.Rd sna/man/plot.blockmodel.Rd sna/man/structdist.Rd sna/man/plot.sociomatrix.Rd sna/man/summary.bbnam.Rd sna/man/lab.optimize.Rd sna/man/reachability.Rd sna/man/gvectorize.Rd sna/man/graphcent.Rd sna/man/rguman.Rd sna/man/gplot3d.Rd sna/man/ sna/man/gcor.Rd sna/man/sna-coercion.Rd sna/man/gt.Rd sna/man/evcent.Rd sna/man/gdist.plotstats.Rd sna/man/gcov.Rd sna/man/print.qaptest.Rd sna/man/print.summary.netlm.Rd sna/man/plot.qaptest.Rd sna/man/connectedness.Rd sna/man/print.bbnam.Rd sna/man/lower.tri.remove.Rd sna/man/print.netlm.Rd sna/man/closeness.Rd sna/man/write.dl.Rd sna/man/plot.cugtest.Rd sna/man/print.cugtest.Rd sna/man/print.lnam.Rd sna/man/gtrans.Rd sna/man/components.Rd sna/man/summary.netlm.Rd sna/man/gilschmidt.Rd sna/man/loadcent.Rd sna/man/read.nos.Rd sna/man/upper.tri.remove.Rd sna/man/sna-internal.Rd sna/man/print.summary.lnam.Rd sna/man/prestige.Rd sna/man/grecip.Rd sna/man/bonpow.Rd sna/man/gplot.layout.Rd sna/man/print.summary.netlogit.Rd sna/man/npostpred.Rd sna/man/clique.census.Rd sna/man/summary.blockmodel.Rd sna/man/gliop.Rd sna/man/lubness.Rd sna/man/hierarchy.Rd sna/man/infocent.Rd sna/man/kcores.Rd sna/man/print.summary.qaptest.Rd sna/man/nties.Rd sna/man/hdist.Rd sna/man/redist.Rd sna/man/consensus.Rd sna/man/mutuality.Rd sna/man/gapply.Rd sna/man/equiv.clust.Rd sna/man/summary.netlogit.Rd sna/man/gscor.Rd sna/man/plot.lnam.Rd sna/man/is.connected.Rd sna/man/interval.graph.Rd sna/man/sna-defunct.Rd sna/man/print.netcancor.Rd sna/man/event2dichot.Rd sna/man/ sna/man/blockmodel.expand.Rd sna/man/summary.qaptest.Rd sna/man/cutpoints.Rd sna/man/eval.edgeperturbation.Rd sna/man/stresscent.Rd sna/man/bicomponent.dist.Rd sna/man/bn.Rd sna/man/betweenness.Rd sna/man/potscalered.mcmc.Rd sna/man/gplot3d.arrow.Rd sna/man/print.summary.bbnam.Rd sna/man/summary.netcancor.Rd sna/man/lnam.Rd sna/man/is.isolate.Rd sna/man/gscov.Rd sna/man/component.size.byvertex.Rd sna/man/efficiency.Rd sna/man/neighborhood.Rd sna/man/plot.equiv.clust.Rd sna/man/component.dist.Rd sna/man/triad.census.Rd sna/man/path.census.Rd sna/man/dyad.census.Rd sna/man/centralgraph.Rd sna/man/isolates.Rd sna/man/rgws.Rd sna/man/rgnmix.Rd sna/man/gden.Rd sna/man/print.blockmodel.Rd sna/man/coleman.Rd sna/man/print.summary.bayes.factor.Rd sna/man/symmetrize.Rd sna/man/rperm.Rd sna/man/make.stochastic.Rd sna/man/print.summary.cugtest.Rd sna/man/blockmodel.Rd sna/man/degree.Rd sna/man/gplot.loop.Rd sna/man/geodist.Rd sna/man/rgraph.Rd sna/man/maxflow.Rd sna/man/brokerage.Rd sna/man/print.bayes.factor.Rd sna/man/netlogit.Rd sna/man/qaptest.Rd sna/man/nacf.Rd sna/man/sna.operators.Rd sna/man/gplot.arrow.Rd

Questions? Problems? Suggestions? or email at

All documentation is copyright its authors; we didn't write any of that.