Learn R Programming

multinets: Multilevel Network Analysis


multinets is an R package that provides tools to visualize and analyze Multilevel Network Data. It was built as an extension to the igraph package.

Installation

The multinets package is on CRAN. It is developed under control version using Git and is hosted in GitHub. You can download it from CRAN using:

install.packages("multinets")

You can download the development version from GitHub using devtools:

# install.packages("devtools")
devtools::install_github("neylsoncrepalde/multinets")

Usage

As a basic example, we will plot a multilevel network. We are going to use linked_sim, a simulated multilevel network dataset.

library(igraph)
#> 
#> Attaching package: 'igraph'
#> The following objects are masked from 'package:stats':
#> 
#>     decompose, spectrum
#> The following object is masked from 'package:base':
#> 
#>     union
library(multinets)
#> multinets was developed by Neylson Crepalde as an extension to 'igraph'

# Load the dataset
data("linked_sim")

# Test if the data is a multilevel network
is_multilevel(linked_sim)
#> [1] TRUE

# Set the layout coordinates
l <- layout_multilevel(linked_sim, layout = layout_with_kk)

# Set different colors and shapes for each level vertices
linked_sim <- set_color_multilevel(linked_sim)
linked_sim <- set_shape_multilevel(linked_sim)

# Plot
plot(linked_sim, layout = l, vertex.size = 5, vertex.label = NA)

Copy Link

Version

Install

install.packages('multinets')

Monthly Downloads

201

Version

0.2.2

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Neylson Crepalde

Last Published

December 14th, 2019

Functions in multinets (0.2.2)

set_shape_multilevel

Set shapes for levels of a multilevel network
extract_mesolevel

Extract the meso level of a multilevel network
is_multilevel

Check whether a graph is multilevel
extract_highlevel

Extract the high level of a multilevel network
layout_multilevel

Layout for multilevel networks
linked_sim

A simulated multilevel network
extract_lowlevel

Extract the low level of a multilevel network
set_color_multilevel

Set colors for levels of a multilevel network
mode_transformation

2-mode to 1-mode transformation