Learn R Programming

⚠️There's a newer version (0.12.1) of this package.Take me there.

migraph

About the package

This package extends existing network analysis packages for analysing multimodal and multilevel networks. The package is intended as a software companion to the forthcoming book:

David Knoke, Mario Diani, James Hollway, and Dimitris Christopoulos (2021) Multimodal Political Networks.

Cambridge University Press: Cambridge.

How does migraph help?

Works with your current network analysis workflow

The package is offered as a complement to existing R packages for network analysis and thus tries to work well with your existing analytic workflows and the classes invoked. All {migraph} measures and models work with data in base formats:

  • adjacency and incidence matrices
  • one-mode and two-mode data frame edgelists

as well as with objects from the following packages:

Since v0.6.3, {migraph} can also import and export to UCINET files.

Extends your current network analysis workflow

{migraph} offers a range of measures and models with sensible defaults. Most wrap existing functions in common packages for use with one-mode networks, but extend these to treat and/or normalise for two-mode (and sometime three-mode) networks correctly. Functions are given intuitive and succinct names that avoid conflicts with existing function names wherever possible.

Manipulation

  • project_rows()
  • project_cols()

Measures

  • Centrality: node_degree(), node_closeness(), node_betweenness(), and node_eigenvector()
  • Centralization: graph_degree(), graph_closeness(), and graph_betweenness()
  • Cohesion: graph_clustering(), node_constraint(), node_smallworld()

Models

  • Blockmodelling: blockmodel_concor()
  • Linear regression: netlm()

Please explore the website to find out more.

Installation

Stable

The easiest way to install the latest stable version of {migraph} is via CRAN. Simply open the R console and enter:

install.packages('migraph')

You can then begin to use {migraph} by loading the package:

library(migraph)

This will load all other required packages and also make the data contained within the package available.

Development

For the latest development version, for slightly earlier access to new features or for testing, you may wish to download and install the binaries from Github or install from source locally.

Binaries for all major OSes -- Windows, Mac, and Linux -- can be found by clicking on the latest release here. Download the appropriate binary for your operating system, and install using an adapted version of the following commands:

  • For Windows: install.packages("~/Downloads/migraph_winOS.zip", repos = NULL)
  • For Mac: install.packages("~/Downloads/migraph_macOS.tgz", repos = NULL)
  • For Unix: install.packages("~/Downloads/migraph_linuxOS.tar.gz", repos = NULL)

To install from source the latest main version of {migraph} from Github, please install the {remotes} package from CRAN and then enter into the console:

  • For latest stable version: remotes::install_github("jhollway/migraph")
  • For latest development version: remotes::install_github("jhollway/migraph@develop")

Relationship to other packages

It draws together, updates, and builds upon many functions currently available in other excellent R packages such as {bipartite}, {multinet}, {netmem}, and {tnet}, and implements many additional features currently only available outside the R ecosystem in packages such as UCINET.

Copy Link

Version

Install

install.packages('migraph')

Monthly Downloads

856

Version

0.6.6

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

James Hollway

Last Published

May 13th, 2021

Functions in migraph (0.6.6)

is

Tests of network properties
centrality

Centrality for one- and two-mode networks
mpn_elite_mex

One-mode Mexican power elite database
node_smallworld

Watts-Strogatz small-world model for two-mode networks
node_constraint

Constraint for one- and two-mode networks
mpn_senate112

Two-mode 112th Congress Senate Voting
plot_releases

A plotting function that visualises historical milestones/releases
project

Projecting two-mode objects into one-mode objects
netlm

Linear regression for multimodal network data
reexports

Objects exported from other packages
read

Reading from/writing to external formats
mpn_evs

Two-mode European Values Survey, 1990 and 2008
mpn_ryanair

One-mode EU policy influence network, June 2004
plot.blockmodel

ggplot2-based plotting of blockmodel results
plot.igraph

Plotting of one-mode and two-mode graphs
coercion

Coercion between migraph-consistent object classes
mpn_elite_usa_advice

Two-mode American power elite database
mpn_elite_usa_money

Three-mode American power elite database
southern_women

Two-mode southern women dataset
to

Tools for reformatting networks, graphs, and matrices
blockmodel

Blockmodelling
graph_clustering

Clustering for one-, two-, and three- mode networks
mpn_bristol

Multimodal (3) Bristol protest events, 1990-2002
centralization

Centralization for one- and two-mode networks
create

Create networks with particular structures
generate

Create networks from particular probabilities