Learn R Programming

dnr (version 0.3.5)

ntriangles: ntriangles

Description

Calculate number of triangles of a network

Usage

ntriangles(x)

Arguments

x

square matrix (adjacency matrix)

Value

scaler, number of triangles

Details

This function calculates the number of triangles in a network given an adjacency matrix. We use igraph for this.

Examples

Run this code
# NOT RUN {
ntriangles(beach[[1]][, ])
# }

Run the code above in your browser using DataLab