un.direct: Convert Directed Network to Undirected Network

Description Usage Arguments Value Author(s) Examples

Description

Converts a directed network to an undirected network

Usage

1
un.direct(A, diagonal = 0)

Arguments

A

Matrix or data frame. Adjacency matrix (network matrix)

diagonal

Numeric. Number to be placed on the diagonal. Defaults to 0

Value

Returns a symmetric adjacency matrix

Author(s)

Alexander Christensen <alexpaulchristensen@gmail.com>

Examples

1
2
3
4
5
6
7
8
# Pearson's correlation only for CRAN checks
A <- TMFG(neoOpen, normal = FALSE)$A

# create a directed network
dir <- A * sample(c(0,1), size = length(A), replace = TRUE)

# undirect the directed network
undir <- un.direct(dir)

NetworkToolbox documentation built on May 28, 2021, 5:11 p.m.