Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

branchlabelfun

Tree Branch Membership Labelling Function


Description

Creates a function which returns the tree branch membership label for any location on a linear network.

Usage

branchlabelfun(L, root = 1)

Arguments

L

Linear network (object of class "linnet"). The network must have no loops.

root

Root of the tree. An integer index identifying which point in vertices(L) is the root of the tree.

Details

The linear network L must be an acyclic graph (i.e. must not contain any loops) so that it can be interpreted as a tree.

The result of f <- branchlabelfun(L, root) is a function f which gives, for each location on the linear network L, the tree branch label at that location.

Tree branch labels are explained in treebranchlabels.

The result f also belongs to the class "linfun". It can be called using several different kinds of data, as explained in the help for linfun. The values of the function are character strings.

Value

A function (of class "linfun").

Author(s)

and Ege Rubak rubak@math.aau.dk

See Also

Examples

# make a simple tree
  m <- simplenet$m
  m[8,10] <- m[10,8] <- FALSE
  L <- linnet(vertices(simplenet), m)
  # make function
  f <- branchlabelfun(L, 1)
  plot(f)
  X <- runiflpp(5, L)
  f(X)

spatstat.linnet

Linear Networks Functionality of the 'spatstat' Family

v2.1-1
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Ottmar Cronie [ctb], Tilman Davies [ctb], Greg McSwiggan [ctb], Suman Rakshit [ctb]
Initial release
2021-03-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.