I found an interesting bug in the findPathLength function. The bug occurred because the code hard coded the index of network metrics returned by enaFlow. Since the function was created, metrics were added to the enaFlow$ns vector that did not preserve its order. I assert that it would be preferable to call the network metrics by their name. This is not possible as the stats are returned, but if we change the data type by calling as.data.frame(enaFlow$ns), we can then refer to the metrics by name. I am NOT advocating that we change how the ns vectors are returned by their original functions.
I found an interesting bug in the findPathLength function. The bug occurred because the code hard coded the index of network metrics returned by enaFlow. Since the function was created, metrics were added to the enaFlow$ns vector that did not preserve its order. I assert that it would be preferable to call the network metrics by their name. This is not possible as the stats are returned, but if we change the data type by calling as.data.frame(enaFlow$ns), we can then refer to the metrics by name. I am NOT advocating that we change how the ns vectors are returned by their original functions.