Learn R Programming

gremes (version 0.1.1)

flowConnection: Creates a matrix of flow connectedness for a tree

Description

Designed for use on river network and its representation as a tree. It is used on object of class FlowConnectionGraph.

Usage

flowConnection(obj, ...)

# S3 method for FlowConnectionGraph flowConnection(obj, ...)

Value

A symmetric matrix with named rows and columns and with entries one or zero with one on element ij if location i is flow onnected with location j.

Arguments

obj

object of class FlowConnectionGraph

...

additional arguments

Details

As input it takes a directed tree according to the flow connection and the output is a matrix of 1's and 0's 1 meaning flow connectedness between node i and node j.

Examples

Run this code
g<- graph(c(1,2,3,2, 2,4,4,5), directed=TRUE)
g<- set.vertex.attribute(g, "name", V(g), c("a", "b", "c", "d", "e"))
fcg<- FlowConnectionGraph(g)
flowConnection(fcg)

Run the code above in your browser using DataLab