Kfullfillment: K-fullfillment

View source: R/oxy-SSNtools.R View source: R/SSNtools.R

KfullfillmentR Documentation

K-fullfillment

Description

calculate K-fullfillment for nodes. K-fullfillment is defined as the number of a node’s k-nearest neighbors that it is connected to. k is equal to the node's degree. Nodes that are exclusively connected to their nearest neighbors will have a k-fulfillment value of 1

Usage

Kfullfillment(nodes, edges, minK = 1, bipartite = FALSE)

Arguments

nodes

nodes of graph (a list of named lists)

edges

edges of graph (a list of lists)

minK

(optional) minimum k value (degree) for a node to have a meaningful K-fullfillment value. K=1 means the node only has one connection.

bipartite

(optional) boolean value of whether the data is a bipartite network

Details

DETAILS

Value

a list of two dataframes. The first R dataframe contains a column of node label, and a column of K_fullfillment associated with the node. The second R dataframe contains the edge pairs and a boolean column indicating whether the source node is k-nearest neighbor to the target node and vice versa.


friendlycities-gatech/SSNtools documentation built on Sept. 13, 2023, 10:40 a.m.