View source: R/shortesthoppath.R
shortesthoppath | R Documentation |
-
shortesthoppath(g, startvertexname, startvertextime, stopvertexname, stopvertextime)
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. |
stopvertextime |
The time of the stop vertex. Must be a time at which an interaction has occurred involving this vertex. |
A vertex list containing all the events on the shortest-hop path between the start and stop vertices/times.
Multiple shortest-hop paths may exist; returns only one of them.
Benjamin Blonder bblonder@email.arizona.edu.
shortesttimepath
data(ants)
allindivs <- c(union(ants$VertexFrom, ants$VertexTo), "NULL1", "NULL2")
g <- generatetonetwork(ants, allindivs)
shp <- shortesthoppath(g, "WBGG", 927, "GYGG", 1423)
plottonet(g, shp)
title(paste(length(unique(shp$Name))," hops"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.