Learn R Programming

bingat (version 1.3)

getNumNodes: Get the Number of Nodes in a Graph

Description

This function will return the number of nodes for a given of graph.

Usage

getNumNodes(data, type)

Arguments

data

A data frame in which the columns (subjects) contain a 0/1 value for row (Node or Edge).

type

The type of graph being used (adjmatrix or adjmatrixlt).

Value

The number of individual nodes in the given graph.

Examples

Run this code
	data(braingraphs)
	
	brainnodes <- getNumNodes(braingraphs, "adjMatrix")
	brainnodes

Run the code above in your browser using DataLab