shuffle_vertices: Shuffle the vertices of a graph or adjacency matrix

Description Usage Arguments Details Value

View source: R/shuffle_vertices.R

Description

Vertices are randomly sampled without replacement to generate a shuffled version of the input.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
shuffle_vertices(x)

## S3 method for class 'matrix'
shuffle_vertices(x)

## S3 method for class 'igraph'
shuffle_vertices(g)

unshuffle_vertices(x)

## S3 method for class 'matrix'
unshuffle_vertices(x)

## S3 method for class 'igraph'
unshuffle_vertices(g)

Arguments

x

An adjacency matrix

g

An igraph object.

Details

The index used to shuffle the vertices is stored as an attribute, which is referenced by the unshuffle_vertices function to get back to the original order.

Value

A shuffled version of the input


crcox/latticize documentation built on Dec. 19, 2021, 6:19 p.m.