Create a path

Share:

Description

Given a set of numbers and a starting point, create a path from the starting point through each point. If cyclic = FALSE, the path stops at p[length(p)] and if cyclic = TRUE the patch goes back to ind.

Usage

1
pathify(ind, p, cyclic = FALSE)

Arguments

ind

[1,1] int, The starting point.

p

[1,m] int, A set of numbers through which the path must go, excluding the starting point.

cyclic

boolean, If TRUE, the path leads back to the starting point. If FALSE, the path stops at last element of p.

Value

A list containing the path definition.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.