add.Edges: Edge Creation

View source: R/add.Edges.R

add.EdgesR Documentation

Edge Creation

Description

This function adds an edge between two points to a grid.

Usage

add.Edges(grid,point.a, point.b)

Arguments

grid

A grid to which the edge should be added.

point.a

A point in a grid given by its row and column.

point.b

A point in a grid given by its row and column.

Details

This function adds an edge between two points to a grid.

Value

The grid with new edge included.

Author(s)

Maximilian Lange, Sven Lautenbach

Examples

##initialize data
m <- matrix(0,10,10)
point.a <- c(5,8)
point.b <- c(10,3)

##calculate the distance of the two points
m <- add.Edges(m,point.a,point.b)
image(m)

sperich documentation built on July 26, 2023, 5:49 p.m.

Related to add.Edges in sperich...