shortesttimepath: Determines a path (shortest by the least time) between a...

View source: R/shortesttimepath.R

shortesttimepathR Documentation

Determines a path (shortest by the least time) between a vertex at a start time and another vertex at any later time.

Description

-

Usage

shortesttimepath(g, startvertexname, startvertextime, stopvertexname)

Arguments

g

The time-ordered network on which to find paths.

startvertexname

The name of the start vertex.

startvertextime

The time of the start vertex. Must be a time at which an interaction has occurred involving this vertex.

stopvertexname

The name of the stop vertex.

Value

A vertex list containing all the events on the shortest-time path between the start vertex at the start time and the stop vertex at a later time.

Note

May generate warning messages - don't worry!

Author(s)

Benjamin Blonder bblonder@email.arizona.edu.

See Also

shortesthoppath

Examples

data(ants)
allindivs <- c(union(ants$VertexFrom, ants$VertexTo), "NULL1", "NULL2")
g <- generatetonetwork(ants, allindivs)
stp <- shortesttimepath(g, "WBGG", 927, "Q")
plottonet(g, stp)
title(paste(diff(range(stp$Time)), "time elapsed"))


timeordered documentation built on Aug. 21, 2023, 1:06 a.m.