Package: sna 2.8

Carter T. Butts

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.

Authors:Carter T. Butts [aut, cre, cph]

sna_2.8.tar.gz
sna_2.8.tar.gz(r-4.5-noble)sna_2.8.tar.gz(r-4.4-noble)
sna_2.8.tgz(r-4.4-emscripten)sna_2.8.tgz(r-4.3-emscripten)
sna.pdf |sna.html
sna/json (API)

# Install 'sna' in R:
install.packages('sna', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Datasets:
  • coleman - Coleman's High School Friendship Data

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

9.45 score 8 stars 90 packages 2.7k scripts 24k downloads 67 mentions 273 exports 16 dependencies

Last updated 3 months agofrom:7526f188e0. Checks:OK: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 08 2024
R-4.5-linux-x86_64OKNov 08 2024

Exports:%c%.matrixadd.isolatesaggarray3d_Ras.edgelist.snaas.sociomatrix.snabbnambbnam.actorbbnam.bfbbnam.fixedbbnam.jntlikbbnam.jntlik.slicebbnam.pooledbbnam.probtiebetweennessbetweenness_Rbicomponent.distbicomponents_Rblockmodelblockmodel.expandbnbn_cftp_Rbn_dyadstats_Rbn_lpl_dyad_Rbn_lpl_triad_Rbn_mcmc_Rbn_ptriad_Rbn_triadstats_Rbn.nlpl.dyadbn.nlpl.edgebn.nlpl.triadbn.nltlbonpowbrokeragebrokerage_Rcentralgraphcentralizationclique.censuscliques_Rclosenesscoef.bncoef.lnamcomponent_dist_Rcomponent.distcomponent.largestcomponent.size.byvertexcomponentscompsizes_Rconnectednessconnectedness_Rconsensuscug.testcugtestcutpointscutpointsDir_RcutpointsUndir_RcycleCensus_Rdegreedegree_Rdiag.removedyad.censusdyadcode_Refficiencyego.extractequiv.clusteval.edgeperturbationevcentevcent_Revent2dichotflowbetgapplygclust.boxstatsgclust.centralgraphgcorgcovgdengdist.plotdiffgdist.plotstatsgeodistgeodist_adj_Rgeodist_Rgeodist_val_Rgilschmidtgilschmidt_Rgliopgplotgplot_layout_fruchtermanreingold_old_Rgplot_layout_fruchtermanreingold_Rgplot_layout_kamadakawai_Rgplot_layout_target_Rgplot.arrowgplot.layout.adjgplot.layout.circlegplot.layout.circrandgplot.layout.eigengplot.layout.fruchtermanreingoldgplot.layout.geodistgplot.layout.hallgplot.layout.kamadakawaigplot.layout.mdsgplot.layout.princoordgplot.layout.randomgplot.layout.rmdsgplot.layout.segeogplot.layout.sehamgplot.layout.springgplot.layout.springrepulsegplot.layout.targetgplot.loopgplot.targetgplot.vertexgplot3dgplot3d_layout_fruchtermanreingold_Rgplot3d_layout_kamadakawai_Rgplot3d.arrowgplot3d.layout.adjgplot3d.layout.eigengplot3d.layout.fruchtermanreingoldgplot3d.layout.geodistgplot3d.layout.hallgplot3d.layout.kamadakawaigplot3d.layout.mdsgplot3d.layout.princoordgplot3d.layout.randomgplot3d.layout.rmdsgplot3d.layout.segeogplot3d.layout.sehamgplot3d.loopgraphcentgrecipgscorgscovgtgtransgvectorizehdisthierarchyinfocentinterval.graphis.connectedis.edgelist.snais.isolateisolateskcoreskcores_Rkcycle.censuskpath.censuslab.optimizelab.optimize.anneallab.optimize.exhaustivelab.optimize.gumbellab.optimize.hillclimblab.optimize.mclnamloadcentlogadd_RlogMeanlogSublogsub_RlogSumlower.tri.removelubnesslubness_con_Rmake.stochasticmaxflowmaxflow_EK_RmutualitynacfneighborhoodnetcancornetlmnetlogitnpostpredntiesnumpermpathCensus_Rplot.bbnamplot.bbnam.actorplot.bbnam.fixedplot.bbnam.pooledplot.blockmodelplot.bnplot.cug.testplot.cugtestplot.equiv.clustplot.lnamplot.qaptestplot.sociomatrixpotscalered.mcmcprestigeprint.bayes.factorprint.bbnamprint.bbnam.actorprint.bbnam.fixedprint.bbnam.pooledprint.blockmodelprint.bnprint.cug.testprint.cugtestprint.equiv.clustprint.lnamprint.netcancorprint.netlmprint.netlogitprint.qaptestprint.summary.bayes.factorprint.summary.bbnamprint.summary.bbnam.actorprint.summary.bbnam.fixedprint.summary.bbnam.pooledprint.summary.blockmodelprint.summary.bnprint.summary.brokerageprint.summary.cugtestprint.summary.lnamprint.summary.netcancorprint.summary.netlmprint.summary.netlogitprint.summary.qaptestpstarqaptestreachabilityreachability_Rread.dotread.nosredistrewire.udrewire.wsrgbern_Rrgbnrgnmrgnmixrgraphrgumanrgwsrmpermrpermsdmatse.lnamsedistsimmeliansociomatrixplotsr2cssstackcountstresscentstresscent_Rstructdiststructure.statisticssummary.bayes.factorsummary.bbnamsummary.bbnam.actorsummary.bbnam.fixedsummary.bbnam.pooledsummary.blockmodelsummary.bnsummary.brokeragesummary.cugtestsummary.lnamsummary.netcancorsummary.netlmsummary.netlogitsummary.qaptestsymmetrizetransitivity_Rtriad_census_Rtriad_classify_Rtriad.censustriad.classifyudrewire_RundirComponents_Rupper.tri.removewrite.dlwrite.noswsrewire_R

Dependencies:clicodafansigluelatticelifecyclemagrittrMatrixnetworkpillarpkgconfigrlangstatnet.commontibbleutf8vctrs

Readme and manuals

Help Manual

Help pageTopics
Add Isolates to a Graphadd.isolates
Butts' (Hierarchical) Bayesian Network Accuracy Modelbbnam bbnam.actor bbnam.fixed bbnam.pooled
Estimate Bayes Factors for the bbnambbnam.bf
Compute the Betweenness Centrality Scores of Network Positionsbetweenness betweenness_R
Calculate the Bicomponents of a Graphbicomponent.dist bicomponents_R
Generate Blockmodels Based on Partitions of Network Positionsblockmodel
Generate a Graph (or Stack) from a Given Blockmodel Using Particular Expansion Rulesblockmodel.expand
Fit a Biased Net Modelbn bn.nlpl.dyad bn.nlpl.edge bn.nlpl.triad bn.nltl bn_dyadstats_R bn_lpl_dyad_R bn_lpl_triad_R bn_ptriad_R bn_triadstats_R coef.bn plot.bn print.bn print.summary.bn summary.bn
Find Bonacich Power Centrality Scores of Network Positionsbonpow
Perform a Gould-Fernandez Brokerage Analysisbrokerage brokerage_R print.summary.brokerage summary.brokerage
Find the Central Graph of a Labeled Graph Stackcentralgraph
Find the Centralization of a Given Network, for Some Measure of Centralitycentralization
Compute Cycle Census Informationclique.census cliques_R
Compute the Closeness Centrality Scores of Network Positionscloseness
Coleman's High School Friendship Datacoleman
Calculate the Component Size Distribution of a Graphcomponent.dist component.largest component_dist_R undirComponents_R
Get Component Sizes, by Vertexcomponent.size.byvertex compsizes_R
Find the Number of (Maximal) Components Within a Given Graphcomponents
Compute Graph Connectedness Scoresconnectedness connectedness_R
Estimate a Consensus Structure from Multiple Observationsconsensus
Univariate Conditional Uniform Graph Testscug.test plot.cug.test print.cug.test
Perform Conditional Uniform Graph (CUG) Hypothesis Tests for Graph-Level Indicescugtest
Identify the Cutpoints of a Graph or Digraphcutpoints cutpointsDir_R cutpointsUndir_R
Compute the Degree Centrality Scores of Network Positionsdegree degree_R
Remove the Diagonals of Adjacency Matrices in a Graph Stackdiag.remove
Compute a Holland and Leinhardt MAN Dyad Censusdyad.census
Compute Graph Efficiency Scoresefficiency
Extract Egocentric Networks from Complete Network Dataego.extract
Find Clusters of Positions Based on an Equivalence Relationequiv.clust print.equiv.clust
Compute the Effects of Single-Edge Perturbations on Structural Indiceseval.edgeperturbation
Find Eigenvector Centrality Scores of Network Positionsevcent evcent_R
Convert an Observed Event Matrix to a Dichotomous matrixevent2dichot
Calculate Flow Betweenness Scores of Network Positionsflowbet
Apply Functions Over Vertex Neighborhoodsgapply
Plot Statistics Associated with Graph Clustersgclust.boxstats
Get Central Graphs Associated with Graph Clustersgclust.centralgraph
Find the (Product-Moment) Correlation Between Two or More Labeled Graphsgcor
Find the Covariance(s) Between Two or More Labeled Graphsgcov
Find the Density of a Graphgden
Plot Differences in Graph-level Statistics Against Inter-graph Distancesgdist.plotdiff
Plot Various Graph Statistics Over a Network MDSgdist.plotstats
Fund the Numbers and Lengths of Geodesics Among Nodes in a Graphgeodist geodist_adj_R geodist_R geodist_val_R
Compute the Gil-Schmidt Power Indexgilschmidt gilschmidt_R
Return a Binary Operation on GLI Values Computed on Two Graphsgliop
Two-Dimensional Visualization of Graphsgplot
Add Arrows or Segments to a Plotgplot.arrow
Vertex Layout Functions for gplotgplot.layout gplot.layout.adj gplot.layout.circle gplot.layout.circrand gplot.layout.eigen gplot.layout.fruchtermanreingold gplot.layout.geodist gplot.layout.hall gplot.layout.kamadakawai gplot.layout.mds gplot.layout.princoord gplot.layout.random gplot.layout.rmds gplot.layout.segeo gplot.layout.seham gplot.layout.spring gplot.layout.springrepulse gplot.layout.target gplot_layout_fruchtermanreingold_old_R gplot_layout_fruchtermanreingold_R gplot_layout_kamadakawai_R
Add Loops to a Plotgplot.loop
Display a Graph in Target Diagram Formgplot.target gplot_layout_target_R
Add Vertices to a Plotgplot.vertex
Three-Dimensional Visualization of Graphsgplot3d
Add Arrows a Three-Dimensional Plotgplot3d.arrow
Vertex Layout Functions for gplot3dgplot3d.layout gplot3d.layout.adj gplot3d.layout.eigen gplot3d.layout.fruchtermanreingold gplot3d.layout.geodist gplot3d.layout.hall gplot3d.layout.kamadakawai gplot3d.layout.mds gplot3d.layout.princoord gplot3d.layout.random gplot3d.layout.rmds gplot3d.layout.segeo gplot3d.layout.seham gplot3d_layout_fruchtermanreingold_R gplot3d_layout_kamadakawai_R
Add Loops to a Three-Dimensional Plotgplot3d.loop
Compute the (Harary) Graph Centrality Scores of Network Positionsgraphcent
Compute the Reciprocity of an Input Graph or Graph Stackgrecip
Find the Structural Correlations Between Two or More Graphsgscor
Find the Structural Covariance(s) Between Two or More Graphsgscov
Transpose an Input Graphgt
Compute the Transitivity of an Input Graph or Graph Stackgtrans transitivity_R
Vectorization of Adjacency Matricesgvectorize
Find the Hamming Distances Between Two or More Graphshdist
Compute Graph Hierarchy Scoreshierarchy
Find Information Centrality Scores of Network Positionsinfocent
Convert Spell Data to Interval Graphsinterval.graph
Is a Given Graph Connected?is.connected
Is Ego an Isolate?is.isolate
List the Isolates in a Graph or Graph Stackisolates
Compute the k-Core Structure of a Graphkcores kcores_R
Compute Path or Cycle Census InformationcycleCensus_R kcycle.census kpath.census pathCensus_R
Optimize a Bivariate Graph Statistic Across a Set of Accessible Permutationslab.optimize lab.optimize.anneal lab.optimize.exhaustive lab.optimize.gumbel lab.optimize.hillclimb lab.optimize.mc
Fit a Linear Network Autocorrelation Modelcoef.lnam lnam se.lnam
Compute the Load Centrality Scores of Network Positionsloadcent
Remove the Lower Triangles of Adjacency Matrices in a Graph Stacklower.tri.remove
Compute Graph LUBness Scoreslubness lubness_con_R
Make a Graph Stack Row, Column, or Row-column Stochasticmake.stochastic
Calculate Maximum Flows Between Verticesmaxflow maxflow_EK_R
Find the Mutuality of a Graphmutuality
Sample Network Covariance and Correlation Functionsnacf
Compute Neighborhood Structures of Specified Orderneighborhood
Canonical Correlation for Labeled Graphsnetcancor
Linear Regression for Network Datanetlm
Logistic Regression for Network Datanetlogit
Take Posterior Predictive Draws for Functions of Networksnpostpred
Find the Number of Possible Ties in a Given Graph or Graph Stacknties
Get the nth Permutation Vector by Periodic Placementnumperm
Plotting for bbnam Objectsplot.bbnam plot.bbnam.actor plot.bbnam.fixed plot.bbnam.pooled
Plotting for blockmodel Objectsplot.blockmodel
Plotting for cugtest Objectsplot.cugtest
Plot an equiv.clust Objectplot.equiv.clust
Plotting for lnam Objectsplot.lnam
Plotting for qaptest Objectsplot.qaptest
Plot Matrices Using a Color/Intensity Gridplot.sociomatrix sociomatrixplot
Compute Gelman and Rubin's Potential Scale Reduction Measure for a Markov Chain Monte Carlo Simulationpotscalered.mcmc
Calculate the Vertex Prestige Scoresprestige
Printing for Bayes Factor Objectsprint.bayes.factor
Printing for bbnam Objectsprint.bbnam print.bbnam.actor print.bbnam.fixed print.bbnam.pooled
Printing for blockmodel Objectsprint.blockmodel
Printing for cugtest Objectsprint.cugtest
Printing for lnam Objectsprint.lnam
Printing for netcancor Objectsprint.netcancor
Printing for netlm Objectsprint.netlm
Printing for netlogit Objectsprint.netlogit
Printing for qaptest Objectsprint.qaptest
Printing for summary.bayes.factor Objectsprint.summary.bayes.factor
Printing for summary.bbnam Objectsprint.summary.bbnam print.summary.bbnam.actor print.summary.bbnam.fixed print.summary.bbnam.pooled
Printing for summary.blockmodel Objectsprint.summary.blockmodel
Printing for summary.cugtest Objectsprint.summary.cugtest
Printing for summary.lnam Objectsprint.summary.lnam
Printing for summary.netcancor Objectsprint.summary.netcancor
Printing for summary.netlm Objectsprint.summary.netlm
Printing for summary.netlogit Objectsprint.summary.netlogit
Printing for summary.qaptest Objectsprint.summary.qaptest
Fit a p*/ERG Model Using a Logistic Approximationpstar
Perform Quadratic Assignment Procedure (QAP) Hypothesis Tests for Graph-Level Statisticsqaptest
Find the Reachability Matrix of a Graphreachability reachability_R
Read Graphviz DOT Filesread.dot
Read (N)eo-(O)rg(S)tat Input Filesread.nos
Find a Matrix of Distances Between Positions Based on Regular Equivalenceredist
Draw from a Skvoretz-Fararo Biased Net Processbn_cftp_R bn_mcmc_R rgbn
Draw Density-Conditioned Random Graphsrgnm
Draw Mixing-Conditioned Random Graphsrgnmix
Generate Bernoulli Random Graphsrgbern_R rgraph
Draw Dyad Census-Conditioned Random Graphsrguman
Draw From the Watts-Strogatz Rewiring Modelrewire.ud rewire.ws rgws udrewire_R wsrewire_R
Randomly Permute the Rows and Columns of an Input Matrixrmperm
Draw a Random Permutation Vector with Exchangeability Constraintsrperm
Estimate the Structural Distance Matrix for a Graph Stacksdmat
Find a Matrix of Distances Between Positions Based on Structural Equivalencesedist
Find the Simmelian Tie Structure of a Graphsimmelian
Tools for Social Network Analysissna
sna Coercion Functionsas.edgelist.sna as.sociomatrix.sna is.edgelist.sna
Deprecated Functions in sna Packagesna-deprecated
Graphical Operators%c%.matrix sna.operators
Convert a Row-wise Self-Report Matrix to a CSS Matrix with Missing Observationssr2css
How Many Graphs are in a Graph Stack?stackcount
Compute the Stress Centrality Scores of Network Positionsstresscent stresscent_R
Find the Structural Distances Between Two or More Graphsstructdist
Compute Network Structure Statisticsstructure.statistics
Detailed Summaries of Bayes Factor Objectssummary.bayes.factor
Detailed Summaries of bbnam Objectssummary.bbnam summary.bbnam.actor summary.bbnam.fixed summary.bbnam.pooled
Detailed Summaries of blockmodel Objectssummary.blockmodel
Detailed Summaries of cugtest Objectssummary.cugtest
Detailed Summaries of lnam Objectssummary.lnam
Detailed Summaries of netcancor Objectssummary.netcancor
Detailed Summaries of netlm Objectssummary.netlm
Detailed Summaries of netlogit Objectssummary.netlogit
Detailed Summaries of qaptest Objectssummary.qaptest
Symmetrize an Adjacency Matrixsymmetrize
Compute the Davis and Leinhardt Triad Censustriad.census triad_census_R
Compute the Davis and Leinhardt Classification of a Given Triadtriad.classify triad_classify_R
Remove the Upper Triangles of Adjacency Matrices in a Graph Stackupper.tri.remove
Write Output Graphs in DL Formatwrite.dl
Write Output Graphs in (N)eo-(O)rg(S)tat Formatwrite.nos