Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

calc_gap

Calculate gaps to make two Chord diagrams in the same scale


Description

Calculate gaps to make two Chord diagrams in the same scale

Usage

calc_gap(x1, x2, big.gap = 10, small.gap = 1)

Arguments

x1

The matrix or the data frame for the first Chord diagram.

x2

The matrix or the data frame for the second Chord diagram.

big.gap

big.gap for the first Chord diagram.

small.gap

small.gap for both Chord diagrams.

Details

Both Chord diagrams should be both two-group Chord diagram.

Value

A numeric value which can be directly set to big.gap in the second Chord diagram.

Examples

set.seed(123)
mat1 = matrix(sample(20, 25, replace = TRUE), 5)
chordDiagram(mat1, directional = 1, grid.col = rep(1:5, 2), transparency = 0.5,
    big.gap = 10, small.gap = 1)
mat2 = mat1 / 2
gap = calc_gap(mat1, mat2, big.gap = 10, small.gap = 1)
chordDiagram(mat2, directional = 1, grid.col = rep(1:5, 2), transparency = 0.5,
    big.gap = gap, small.gap = 1)

circlize

Circular Visualization

v0.4.12
MIT + file LICENSE
Authors
Zuguang Gu
Initial release
2021-1-8

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.