Learn R Programming

spatgraphs (version 2.62)

spatgraphs-weight: Weight edges

Description

Weight edges with a given function of node-node Euclidian distances.

Usage

weight.sg(x, pp, f=function(x) exp(-x^2/scale), scale=1, ...)
   sg2wadj(x)

Arguments

x
Graph.
pp
Point pattern.
f
R-function for weight computation; a function of distance.
scale
Scaling factor used in (possibly) in f.
...
Further parameters (ignored at the moment.)

Value

  • returns the graph x with additional compontent $weights that contains the weights for edges listed in $edges. For example, if x$edges[[1]] is c(2,3), and x$weights is c(1, 0.5), then the weight of edge 1->2 is 1 and edge 1->3 is 0.5.

Details

ll{ Date: 2011-04-14 License: GPL v2 or later }