countNeighbours: Count neighbours per node

View source: R/func__networkAnalyser__countNeighbours.R

countNeighboursR Documentation

Count neighbours per node

Description

Count how many neighbours does each node have in a network. The function treats the network as undirected.

Usage

countNeighbours(net, groups = NULL, na = "Mix")

Arguments

net

A Graph object, which can be created by the function mkNetwork.

groups

A data frame mapping alleles to groups, such as genes. The first column stores allele names and the second column stores group information.

na

A character argument specifying the default group in the output.

Value

When groups != NULL, the function returns a list of two data frames for allele-level and gene-level neighbour counts, respectively. Otherwise, a single data frame of allele-level neighbour counts is returned.

Author(s)

Yu Wan (wanyuac@126.com)


wanyuac/GeneMates documentation built on Aug. 12, 2022, 7:37 a.m.