Running 'degree_tests.R' [155s]
  Running 'density_tests.R' [158s]
  Running 'durations_tests.R' [2s]
  Running 'fromDissTests.R' [2s]
  Running 'pShift_tests.R' [124s]
  Running 'path_tests.R' [3s]
  Running 'reachable_tests.R' [76s]
  Running 'statsWrapper_tests.R' [13s]
  Running 'timeProjectedNetwork_tests.R' [2s]
Running the tests in 'tests/degree_tests.R' failed.
Complete output:
  > # tests for temporal degree functions
  > library(tsna)
  Loading required package: network
  
  'network' 1.18.2 (2023-12-04), part of the Statnet Project
  * 'news(package="network")' for changes since last version
  * 'citation("network")' for citation information
  * 'https://statnet.org' for help, support, and other information
  
  Loading required package: networkDynamic
  
  'networkDynamic' 0.11.4 (2023-12-10?), part of the Statnet Project
  * 'news(package="networkDynamic")' for changes since last version
  * 'citation("networkDynamic")' for citation information
  * 'https://statnet.org' for help, support, and other information
  
  > library(testthat)
  > library(sna)
  Loading required package: statnet.common
  
  Attaching package: 'statnet.common'
  
  The following objects are masked from 'package:base':
  
      attr, order
  
  sna: Tools for Social Network Analysis
  Version 2.7-2 created on 2023-12-05.
  copyright (c) 2005, Carter T. Butts, University of California-Irvine
   For citation information, type citation("sna").
   Type help(package="sna") to get started.
  
  > 
  > data(windsurfers)
  > tDegree(windsurfers)
  Time Series:
  Start = 0 
  End = 31 
  Frequency = 1 
      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
   0  6  3  0  4  4  3  1  3  3  0  3 NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   1  6  7  2 NA  3 NA NA NA NA  0 NA  4  3  4  4  0  1  6  3  5 NA NA NA NA NA
   2  3 NA  3  4 NA NA  0 NA NA NA  0  6 NA NA  6 NA NA NA NA NA  5  0  6  5  5
   3  5 NA  0 NA NA NA  0 NA NA  3  6  2  0 NA NA NA  2 NA NA NA  6  6  2  6  6
   4  4 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA  0 NA NA NA NA NA  2  2 NA
   5  0  3 NA NA NA  3 NA NA NA NA NA NA NA NA NA NA NA  2 NA NA NA NA NA NA NA
   6  9  7  4  2 NA  7 NA NA NA NA NA NA NA NA NA NA NA  2 NA NA NA NA NA NA NA
   7  8 12 NA  6  3 10 NA  5 NA NA NA NA NA NA NA  2 NA NA  0 NA NA NA NA NA NA
   8  6 NA  6 NA NA  0 NA NA NA NA  0 NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   9 11  8 NA  5 NA NA NA NA NA NA NA 12  3 NA 11  5 NA NA NA NA NA NA NA NA NA
  10 10 16  1 10  8  8 NA NA NA  7 NA  0 NA  4 NA NA  0 NA NA NA  2 NA NA  0 NA
  11  9 NA  4  3 NA NA NA NA NA NA NA NA NA NA NA  2 NA NA NA NA NA NA NA NA NA
  12  4 NA  2  1 NA NA NA NA NA NA NA NA NA NA NA  0 NA NA NA NA NA NA NA NA NA
  13  7 NA  0  5 NA NA NA NA NA NA NA NA NA NA NA  0 NA NA NA NA NA NA NA NA NA
  14  2 NA NA  2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  15  5 NA NA NA NA NA NA NA NA NA NA NA NA  1 NA  0 NA NA NA NA NA NA NA NA NA
  16 NA NA NA  5  2 NA NA NA NA NA NA 11  4  6 NA  0  0 NA NA NA NA NA 12 NA  0
  17  8 NA NA  9 NA NA NA NA NA NA NA  0  3  5 NA NA  4 NA NA NA  0 NA  6 NA NA
  18  2  0  0 NA NA NA NA NA NA NA NA  3 NA NA  3  0 NA NA NA NA NA NA NA  0 NA
  19  7  0  3  5 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  20  7  8  3  6 NA NA  3 NA NA NA NA NA NA NA NA  3  7 NA NA NA NA NA NA NA NA
  21  8 NA NA  6 NA NA  5 NA NA NA  8 NA NA  8 10  0 NA NA NA NA NA NA NA NA NA
  22  4 NA NA  2 NA NA NA NA NA NA NA NA  0  0 NA  0 NA NA NA NA NA NA NA NA NA
  23 14 10 10  8 NA 11 NA NA NA NA NA NA NA NA NA  0  0 NA NA NA NA NA NA NA NA
  24 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  25 NA NA  2 NA NA NA NA NA NA NA NA NA NA NA NA  1 NA NA NA NA NA NA NA NA NA
  26  5 NA  1  3 NA NA NA NA NA NA NA NA NA NA NA  0 NA NA NA NA NA NA NA NA NA
  27 NA NA  0  0 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  28  5 NA NA  5 NA NA NA NA NA NA NA NA NA NA  0  6 NA  1 NA NA NA NA NA NA NA
  29  4  1  1  0 NA NA NA NA NA NA NA NA NA NA NA  0  4 NA NA NA NA NA NA NA NA
  30  6 10  4  8 NA  6 NA NA NA NA NA  0  7  6  5  6 NA NA NA NA  3  4  8  6  8
  31 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
     26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
   0 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   1 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   2  3  3  8  1  3  7  2  3  0  0  3 NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   3 NA NA NA  3 NA  4 NA NA  7 NA NA  6  0  1  0  3  0 NA NA NA NA NA NA NA NA
   4 NA NA NA  0 NA NA NA NA NA NA NA  2 NA NA NA  0  2  2  2  0  0  2 NA NA NA
   5 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA  3  1 NA
   6 NA NA NA NA NA NA NA NA NA NA NA NA NA  3  3 NA NA NA NA NA NA NA NA NA  6
   7 NA NA NA  6  2 NA NA NA NA NA NA NA NA  5 NA NA NA NA NA NA NA NA  2 NA  0
   8 NA NA NA NA  4 NA NA NA NA NA NA NA NA  3  3 NA NA NA NA NA NA NA  0 NA NA
   9  8 10 10 NA NA NA NA NA NA NA NA 10 NA NA NA  6 NA NA  9 11 NA NA NA NA NA
  10  4  6  6  0 NA NA NA NA NA  6 NA  5 NA NA 10 NA NA  0  8  2  1 NA NA NA NA
  11  1 NA NA NA NA NA NA NA NA NA NA NA NA  3 NA NA NA NA NA NA NA NA NA NA NA
  12  0  0 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  13 NA NA NA NA NA NA NA NA NA NA NA NA  0  4  2 NA NA NA NA NA NA NA NA NA  0
  14 NA NA NA  0  1 NA NA NA NA NA NA NA NA  3 NA NA NA NA NA NA NA NA NA NA NA
  15 NA NA NA  1 NA  0 NA NA NA NA NA NA NA NA NA  0 NA NA NA NA NA NA NA NA NA
  16  3 11  7 NA NA NA NA NA NA NA NA  5 NA  1 NA NA NA NA  5 NA NA NA NA  0 NA
  17 NA  5  5  5 NA NA NA NA NA NA NA  4 NA NA NA NA NA NA  4 NA  2 NA NA NA NA
  18 NA NA NA  1 NA NA NA NA NA NA NA NA NA  0 NA NA NA NA NA NA NA NA NA NA NA
  19 NA NA NA  5 NA NA NA NA NA NA NA NA NA  5  6 NA NA NA NA NA NA NA NA NA NA
  20 NA NA NA  8 NA  0 NA NA NA NA NA NA NA NA  0 NA NA NA NA NA NA NA  0 NA NA
  21 NA NA NA  5 NA NA NA NA NA  8 NA NA NA NA NA  0 NA NA NA NA NA NA  2 NA NA
  22 NA NA NA  4 NA NA NA NA NA  0 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  23 NA  5  5 10 NA NA NA NA NA NA NA  5 NA NA NA  6  0 NA  8 NA NA NA  3 NA NA
  24 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  25 NA NA NA NA NA NA NA NA NA NA NA NA NA  1  1  3 NA NA NA NA NA NA  0 NA NA
  26 NA NA NA NA NA NA NA NA NA NA NA NA NA  3 NA  0 NA NA NA NA NA NA NA NA NA
  27 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  28 NA NA NA NA NA NA NA NA NA NA NA NA NA  5 NA NA NA NA NA NA NA NA NA NA NA
  29 NA NA NA NA  0 NA NA NA NA NA NA NA NA  0 NA NA NA NA NA NA NA NA NA NA NA
  30 NA NA NA NA NA NA NA NA NA NA NA  7  3 NA NA NA NA  4  4 NA NA NA  0 NA NA
  31 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
     51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
   0 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   1 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   3 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   4 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   5 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   6  5  3  5  3  5  2  0 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   7  3 NA NA NA  0 NA  5  2  6  1  5  1 NA NA NA NA NA NA NA NA NA NA NA NA NA
   8 NA NA NA NA NA NA NA NA NA  0  0 NA  4  4 NA NA NA NA NA NA NA NA NA NA NA
   9 NA NA NA NA NA NA NA NA  5 NA NA NA NA NA  5  5  3 13 10  8  6  7 11 NA NA
  10 NA  1  8 NA NA NA NA NA NA  0 NA  1 NA NA  2  6  4  2  7  0 NA NA NA 10  4
  11 NA NA NA NA NA  3 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA  3 NA
  12 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA  0 NA NA NA NA  3 NA
  13  0 NA NA NA NA NA NA NA  6  4 NA  2 NA NA NA NA NA NA NA NA NA NA NA NA NA
  14 NA NA NA NA NA NA NA NA NA  0 NA NA NA NA NA NA NA NA  0 NA NA NA NA  4 NA
  15 NA NA NA NA NA NA NA NA NA  2 NA NA NA  0 NA NA NA NA NA NA NA NA NA  3 NA
  16 NA NA NA NA NA  2 NA NA  6 NA NA NA NA NA NA NA 10 NA NA NA NA NA NA  6 NA
  17 NA  5 NA NA NA NA NA NA  6 NA NA NA NA NA NA NA  3 NA NA  1  5 NA NA  9 NA
  18 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA  3 NA NA NA NA NA
  19 NA NA NA NA NA NA NA NA  0 NA NA NA NA NA NA NA NA NA NA NA NA NA NA  7 NA
  20 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA  7 NA
  21 NA NA NA NA NA NA NA NA NA NA NA NA NA NA  0  6 NA NA NA NA NA NA NA  7 NA
  22 NA NA NA NA NA NA NA  3 NA NA NA NA  3 NA NA NA NA NA NA NA NA NA NA NA NA
  23 NA 14 NA NA NA NA NA  5  8 NA NA NA NA NA  4 12 NA NA  5  6 NA NA NA 14 NA
  24 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  25 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA  2 NA NA NA NA NA NA NA  6 NA
  26  4 NA NA NA NA NA NA NA NA  0 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  27 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA  0 NA NA NA NA NA
  28 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA  1 NA NA NA  6 NA
  29  0 NA  0 NA NA NA NA NA NA NA NA NA  4 NA NA NA NA NA NA NA NA NA NA NA NA
  30  0 NA NA NA NA NA NA  0 NA NA NA NA NA NA  1  0  9 11  6 NA NA NA NA  8  0
  31 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
     76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
   0 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   1 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   3 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   4 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   5 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   6 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   7 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   8 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
   9 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  10  3  4 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  11 NA NA  2  2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  12 NA NA NA NA  2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  13 NA NA  2 NA NA  0 NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  14 NA NA  0 NA NA NA  2 NA NA NA NA NA NA NA NA NA NA NA NA NA
  15  0 NA NA NA NA NA  0  2 NA NA NA NA NA NA NA NA NA NA NA NA
  16 NA  7 NA NA NA NA NA NA  0  7  0 NA NA NA NA NA NA NA NA NA
  17 NA NA NA NA NA NA NA NA NA  5 NA NA NA NA NA NA NA NA NA NA
  18 NA NA NA NA NA NA NA NA NA NA NA  1  3 NA NA NA NA NA NA NA
  19 NA NA NA NA  4 NA NA NA NA NA NA NA  0 NA NA NA NA NA NA NA
  20 NA NA NA NA NA  3 NA NA NA NA NA NA NA  7  0 NA NA NA NA NA
  21 NA NA NA NA NA NA NA NA  6 NA NA NA NA NA NA  1 NA NA NA NA
  22 NA NA NA NA NA NA NA NA  0 NA NA NA NA NA NA NA NA NA NA NA
  23 NA NA  4 NA NA NA NA NA  4 NA NA  2 NA 11 NA NA  2 NA NA NA
  24 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  25 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  26 NA NA  2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA  0 NA NA
  27 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  28 NA NA NA  5 NA NA NA NA NA NA NA NA NA NA  0 NA NA NA NA NA
  29 NA NA NA NA NA NA NA  4 NA  4 NA NA NA NA NA NA NA NA  0 NA
  30 NA NA NA  3 NA NA NA NA NA NA NA  1 NA  9 NA NA  1 NA NA  4
  31 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  > data(McFarland_cls33_10_16_96)
  > tDegree(cls33_10_16_96)
  Time Series:
  Start = 0 
  End = 49 
  Frequency = 1 
      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
   0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
   1  0  0  0  0  0  0  0  0  0  0  0  0  0  1  0  0  1  0  0  0
   2  0  0  0  0  0  0  0  0  0  1  0  1  0  0  0  0  0  0  0  0
   3  0  0  0  0  1  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0
   4  0  0  0  0  0  0  1  0  0  1  0  0  0  0  0  0  0  0  0  0
   5  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  1  1  0  0  0
   6  0  0  0  0  0  0  1  0  0  0  0  0  0  0  0  0  1  0  0  0
   7  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
   8  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
   9  0  0  0  1  0  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0
  10  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  11  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  12  0  0  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0  0  0  1
  13  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  14  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  15  0  0  0  0  0  0  1  0  0  0  0  0  0  0  1  0  0  0  0  0
  16  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  17  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  18  0  0  1  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0  0  0
  19  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  20  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  21  1  1  1  1  1  1  1  1  1  1  1  1  1 19  1  1  1  1  1  1
  22  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  23  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  24  1  0  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0  0  0  0
  25  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  26  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  27  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  1  0  0  0  1
  28  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  29  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  30  0  0  0  0  0  0  0  0  0  0  1  0  0  0  1  0  0  0  0  0
  31  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  32  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  33  0  0  1  0  0  0  0  0  0  0  0  0  0  1  0  0  0  0  0  0
  34  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  35  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  36  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  37  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  38  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  1  0  0  0  1
  39  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  40  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  41  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  42  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  43  0  0  0  0  0  0  0  1  0  0  0  0  1  0  0  0  0  0  0  0
  44  0  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0  1  0  0  0
  45  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  46  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  47  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  48  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  49 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
  > 
  > library(networkDynamicData)
  > data(concurrencyComparisonNets)
  > 
  > # alternate version using sna's degree function for comparison testing
  > require(sna)
  > tSnaDegree<-function(nd,start, end, time.interval=1,cmode=c('freeman','indegree','outdegree')){
  +   if(missing(start) | missing(end)){
  +     times <- get.change.times(nd)
  +     if (length(times) == 0) {
  +       warning("network does not appear to have any dynamic information. Using start=0 end=1")
  +       start = 0
  +       end = 0
  +     }
  +     times[times == Inf] <- NA
  +     times[times == -Inf] <- NA
  +     start = min(times, na.rm = T)
  +     end = max(times, na.rm = T)
  +   }
  +   
  +   # figure out the times where we will do evaluations
  +   times<-seq(from = start, to=end,by = time.interval)
  +   
  +   # figure out gmode
  +   if(is.directed(nd)){
  +     gmode<-'digraph'
  +   } else {
  +     gmode<-'graph'
  +   }
  +   
  +   cmode<-match.arg(cmode)
  +   
  +   # allocate a matrix to hold the degrees of each vertex at each evaluation time
  +   degrees<-matrix(NA,nrow = network.size(nd),ncol=length(times),dimnames = list(paste('v',seq_len(network.size(nd)),sep='')),times)
  +   for (i in seq_len(length(times))){
  +     at<-times[i]
  +     slice<-network.extract(nd,at=at)
  +     vids<-which(is.active(nd,at=at,v = seq_len(network.size(nd))))
  +     degreesAt<-degree(as.matrix(slice),gmode=gmode,diag=has.loops(nd),cmode=cmode)
  +     # deal with case of no active vertices where sapply returns list()
  +     if (!is.list(degreesAt)){
  +       degrees[vids,i]<-degreesAt
  +     }
  +     
  +   }
  +   # transpose to match new orientation and change class to ts
  +   degrees<- ts(t(degrees), start = start, end = times[length(times)], 
  +      deltat = time.interval)
  +   return(degrees)
  + }
  > 
  > # check class of returned object
  > expect_true(is.ts(tDegree(windsurfers)))
  > 
  > # comparison with vertex dynamics
  > expect_equal(tDegree(windsurfers),tSnaDegree(windsurfers),check.attributes=FALSE)
  > 
  > # comparison with directed network
  > expect_equal(tDegree(cls33_10_16_96),tSnaDegree(cls33_10_16_96),check.attributes=FALSE)
  > 
  > expect_equal(tDegree(cls33_10_16_96,cmode='indegree'),tSnaDegree(cls33_10_16_96,cmode='indegree'),check.attributes=FALSE)
  > expect_equal(tDegree(cls33_10_16_96,cmode='outdegree'),tSnaDegree(cls33_10_16_96,cmode='outdegree'),check.attributes=FALSE)
  > 
  > # comparison with subset of undirected network
  > expect_equal(tDegree(base,start=0,end=103,time.interval = 10),tSnaDegree(base,start=0,end=103,time.interval = 10),check.attributes=FALSE)
  > 
  > # comparison with loops
  > loopy<-network.initialize(5,loops = TRUE)
  > add.edges.active(loopy,1,1,onset=0,terminus=1)
  > add.edges.active(loopy,2,3,onset=0,terminus=1)
  > expect_equal(tDegree(loopy),tSnaDegree(loopy),check.attributes=FALSE)
  > 
  > # comparison with undeclared loops
  > loopy2<-network.initialize(5,loops = FALSE)
  > add.edges.active(loopy2,1,1,onset=0,terminus=1)
  > add.edges.active(loopy2,2,3,onset=0,terminus=1)
  > # this gives error because sna version doesn't know to calculate the diagonal
  > #expect_equal(tDegree(loopy2),tSnaDegree(loopy2),info = 'network with undeclared loops',check.attributes=FALSE)
  > 
  > 
  > # evaluation on a resonably sized network using start end and time interval
  > degs<-tDegree(base,start = 0,end=102,time.interval = 10)
  > expect_equal(nrow(degs),11)
  > expect_equal(ncol(degs),network.size(base))
  > 
  > # check labeling
  > expect_equal(colnames(degs),as.character(1:1000))
  > 
  > # check results close to expected value for the network
  > expect_equal(mean(colMeans(degs)),0.7609091)
  > 
  > 
  > 
  > proc.time()
     user  system elapsed 
     8.12    1.09    9.18 
Running the tests in 'tests/density_tests.R' failed.
Complete output:
  > # tests for temporal density functions
  > require(tsna)
  Loading required package: tsna
  Loading required package: network
  
  'network' 1.18.2 (2023-12-04), part of the Statnet Project
  * 'news(package="network")' for changes since last version
  * 'citation("network")' for citation information
  * 'https://statnet.org' for help, support, and other information
  
  Loading required package: networkDynamic
  
  'networkDynamic' 0.11.4 (2023-12-10?), part of the Statnet Project
  * 'news(package="networkDynamic")' for changes since last version
  * 'citation("networkDynamic")' for citation information
  * 'https://statnet.org' for help, support, and other information
  
  > require(testthat)
  Loading required package: testthat
  > require(networkDynamicData)
  Loading required package: networkDynamicData
  > 
  > # tests of argument processing
  > data(moodyContactSim)
  > 
  > expect_error(tEdgeDensity(0),regexp='first argument is a networkDynamic')
  > expect_error(tEdgeDensity(moodyContactSim,mode='foo'))
  > expect_error(tEdgeDensity(moodyContactSim,agg.unit='foo'))
  > 
  > 
  > # density of a network with no edges
  > expect_equal(tEdgeDensity(as.networkDynamic(network.initialize(3)),mode='event'),0)
  > # density of network size 0
  > expect_equal(tEdgeDensity(as.networkDynamic(network.initialize(0)),mode='event'),0)
  > 
  > # complete network, explicit timing
  > complete<-as.networkDynamic(network.initialize(5))
  > complete[,]<-1
  > activate.edges(complete,onset=0,terminus=100)
  > expect_equal(tEdgeDensity(complete,mode='event'),0.01)
  > expect_equal(tEdgeDensity(complete,agg.unit='dyad'),1)
  > expect_equal(tEdgeDensity(complete),1)
  > 
  > # density of a complete network with no explicit timing
  > complete<-as.networkDynamic(network.initialize(5))
  > complete[,]<-1
  > expect_equal(tEdgeDensity(complete,mode='event'),1)
  > expect_equal(tEdgeDensity(complete,agg.unit='dyad'),1)
  > expect_equal(tEdgeDensity(complete),1)
  > 
  > # density of a complete network with no explicit timing, active.default=FALSE
  > expect_equal(tEdgeDensity(complete,active.default=FALSE,agg.unit='dyad'),0)
  > expect_equal(tEdgeDensity(complete,active.default=FALSE,agg.unit='edge'),0)
  > 
  > # density of a complete network with no explicit timing
  > complete<-as.networkDynamic(network.initialize(5))
  > complete[,]<-1
  > expect_equal(tEdgeDensity(complete,mode='event'),1)
  > expect_equal(tEdgeDensity(complete,agg.unit='dyad'),1)
  > expect_equal(tEdgeDensity(complete),1)
  > 
  > 
  > # single edge, implicit timing
  > half<-as.networkDynamic(network.initialize(2))
  > half[1,2]<-1
  > expect_equal(tEdgeDensity(half,mode='event'),1)
  > expect_equal(tEdgeDensity(half,agg.unit='dyad'),0.5)
  > expect_equal(tEdgeDensity(half),1)
  > 
  > # single undirected edge, implicit timing
  > half<-as.networkDynamic(network.initialize(2,directed=FALSE))
  > half[1,2]<-1
  > expect_equal(tEdgeDensity(half,mode='event'),1)
  > expect_equal(tEdgeDensity(half,agg.unit='dyad'),1)
  > expect_equal(tEdgeDensity(half),1)
  > 
  > # two edges, each half active
  > half<-network.initialize(2)
  > add.edges.active(half,tail=1:2,head=2:1,onset=0:1,terminus=1:2)
  > expect_equal(tEdgeDensity(half,mode='event'),0.5)
  > expect_equal(tEdgeDensity(half,agg.unit='dyad'),0.5)
  > expect_equal(tEdgeDensity(half),0.5)
  > 
  > # two edges, each half active in a network of 4
  > half<-network.initialize(4)
  > add.edges.active(half,tail=1:2,head=2:1,onset=0:1,terminus=1:2)
  > expect_equal(tEdgeDensity(half,mode='event'),0.5)
  > expect_equal(tEdgeDensity(half,agg.unit='dyad'),2/24)
  > expect_equal(tEdgeDensity(half),0.5)
  > 
  > # single edge in range defined by net.obs
  > obs<-as.networkDynamic(network.initialize(2))
  > add.edges.active(obs,tail=1,head=2,onset=1,terminus=2)
  > obs%n%'net.obs.period'<-list(observations=list(c(0,3)),mode="discrete", time.increment=1,time.unit="step")
  > expect_equal(tEdgeDensity(obs,mode='event'),1/3)
  > expect_equal(tEdgeDensity(obs,agg.unit='dyad'),1/6)
  > expect_equal(tEdgeDensity(obs),1/3)
  > 
  > # single edge in network with loop
  > loop<-as.networkDynamic(network.initialize(2,loops=TRUE))
  > loop[1,2]<-1
  > expect_equal(tEdgeDensity(loop,mode='event'),1)
  > expect_equal(tEdgeDensity(loop,agg.unit='dyad'),0.25) # loop increases possible dyads to 4
  > expect_equal(tEdgeDensity(loop),1)
  > 
  > 
  > # test on example networks 
  > # have no valid baseline to compare, so just comparing to previous output
  > data(concurrencyComparisonNets)
  > expect_equal(tEdgeDensity(base,mode='event'),0.009809139,tolerance=0.0000001)
  > expect_equal(tEdgeDensity(base),0.1996973,tolerance=0.0000001)
  > expect_equal(tEdgeDensity(base,agg.unit='dyad'),0.000766006,tolerance=0.0000001)
  > 
  > expect_equal(tEdgeDensity(middle, mode='event'),0.00981934,tolerance=0.0000001)
  > expect_equal(tEdgeDensity(middle),0.1921979,tolerance=0.0000001)
  > expect_equal(tEdgeDensity(middle,agg.unit='dyad'),0.0007387788,tolerance=0.0000001)
  > 
  > expect_equal(tEdgeDensity(monog, mode='event'),0.009819324,tolerance=0.0000001)
  > expect_equal(tEdgeDensity(monog),0.1979761,tolerance=0.000001)
  > expect_equal(tEdgeDensity(monog,agg.unit='dyad'),0.0007617818,tolerance=0.0000001)
  > 
  > 
  > 
  > 
  > proc.time()
     user  system elapsed 
     3.78    0.31    4.07 
Running the tests in 'tests/pShift_tests.R' failed.
Complete output:
  > library(tsna)
  Loading required package: network
  
  'network' 1.18.2 (2023-12-04), part of the Statnet Project
  * 'news(package="network")' for changes since last version
  * 'citation("network")' for citation information
  * 'https://statnet.org' for help, support, and other information
  
  Loading required package: networkDynamic
  
  'networkDynamic' 0.11.4 (2023-12-10?), part of the Statnet Project
  * 'news(package="networkDynamic")' for changes since last version
  * 'citation("networkDynamic")' for citation information
  * 'https://statnet.org' for help, support, and other information
  
  > library(testthat)
  > 
  > 
  > data(McFarland_cls33_10_16_96)
  > output<-pShiftCount(cls33_10_16_96)
  Loading required namespace: relevent
  > 
  > expect_equal(ncol(output),13)
  > 
  > # check expected values for clss 33
  > expect_equal(output, matrix(c(247,2,45,3,2,5,4,7,8,155,0,1,29),ncol=13, byrow=TRUE),check.attributes=FALSE)
  > 
  > # check alternate outputformat
  > output <-pShiftCount(cls33_10_16_96,output='full')
  > expect_equal(dim(output),c(691,18))
  > expect_equal(colnames(output),c("AB-BA","AB-B0","AB-BY","A0-X0","A0-XA","A0-XY","AB-X0","AB-XA","AB-XB","AB-XY","A0-AY","AB-A0","AB-AY"   , "onset","terminus", "tail","head","group"))
  > 
  > 
  > # test for non-directed network
  > expect_error(pShiftCount(as.networkDynamic(network.initialize(10,directed=FALSE))),regexp = 'only appropriate for directed networks')
  > 
  > # test for empty network
  > expect_equal(nrow(pShiftCount(as.networkDynamic(network.initialize(10)))),0)
  > # test for zero network
  > expect_equal(nrow(pShiftCount(as.networkDynamic(network.initialize(0)))),0)
  > 
  > # test for time range
  > expect_equal(pShiftCount(cls33_10_16_96,start=10,end=11), matrix(c(4,0,2,0,0,0,0,0,0,1,0,0,1),ncol=13, byrow=TRUE),check.attributes=FALSE)
  > 
  > 
  > 
  > #  construct network that tests each shift
  > test1<-networkDynamic(edge.spells=matrix(c(0,1,1,2,
  +                                            1,2,2,1),ncol=4,byrow = TRUE))
  Initializing base.net of size 2 imputed from maximum vertex id in edge records
  Created net.obs.period to describe network
   Network observation period info:
    Number of observation spells: 1 
    Maximal time range observed: 0 until 2 
    Temporal mode: continuous 
    Time unit: unknown 
    Suggested time increment: NA 
  > expect_equal(as.numeric(pShiftCount(test1)),c(1,0,0,0,0,0,0,0,0,0,0,0,0))
  > 
  > test2<-networkDynamic(edge.spells=matrix(c(0,1,1,2,
  +                                            1,2,2,1,
  +                                            1,2,2,3,
  +                                            1,2,2,4,
  +                                            1,2,2,5
  +                                           ),ncol=4,byrow = TRUE))
  Initializing base.net of size 5 imputed from maximum vertex id in edge records
  Created net.obs.period to describe network
   Network observation period info:
    Number of observation spells: 1 
    Maximal time range observed: 0 until 2 
    Temporal mode: continuous 
    Time unit: unknown 
    Suggested time increment: NA 
  > expect_equal(as.numeric(pShiftCount(test2)),c(0,1,0,0,0,0,0,0,0,0,0,0,0))
  > 
  > test3<-networkDynamic(edge.spells=matrix(c(0,1,1,2,
  +                                            1,2,2,3),ncol=4,byrow = TRUE))
  Initializing base.net of size 3 imputed from maximum vertex id in edge records
  Created net.obs.period to describe network
   Network observation period info:
    Number of observation spells: 1 
    Maximal time range observed: 0 until 2 
    Temporal mode: continuous 
    Time unit: unknown 
    Suggested time increment: NA 
  > expect_equal(as.numeric(pShiftCount(test3)),c(0,0,1,0,0,0,0,0,0,0,0,0,0))
  > 
  > test4<-networkDynamic(edge.spells=matrix(c(0,1,1,2,
  +                                            0,1,1,3,
  +                                            0,1,1,4,
  +                                            1,2,2,1,
  +                                            1,2,2,3,
  +                                            1,2,2,4
  + ),ncol=4,byrow = TRUE))
  Initializing base.net of size 4 imputed from maximum vertex id in edge records
  Created net.obs.period to describe network
   Network observation period info:
    Number of observation spells: 1 
    Maximal time range observed: 0 until 2 
    Temporal mode: continuous 
    Time unit: unknown 
    Suggested time increment: NA 
  > expect_equal(as.numeric(pShiftCount(test4)),c(0,0,0,1,0,0,0,0,0,0,0,0,0))
  > 
  > test5<-networkDynamic(edge.spells=matrix(c(0,1,1,2,
  +                                            0,1,1,3,
  +                                            0,1,1,4,
  +                                            1,2,2,1
  + ),ncol=4,byrow = TRUE))
  Initializing base.net of size 4 imputed from maximum vertex id in edge records
  Created net.obs.period to describe network
   Network observation period info:
    Number of observation spells: 1 
    Maximal time range observed: 0 until 2 
    Temporal mode: continuous 
    Time unit: unknown 
    Suggested time increment: NA 
  > expect_equal(as.numeric(pShiftCount(test5)),c(0,0,0,0,1,0,0,0,0,0,0,0,0))
  > 
  > test6<-networkDynamic(edge.spells=matrix(c(0,1,1,2,
  +                                            0,1,1,3,
  +                                            0,1,1,4,
  +                                            1,2,2,3
  + ),ncol=4,byrow = TRUE))
  Initializing base.net of size 4 imputed from maximum vertex id in edge records
  Created net.obs.period to describe network
   Network observation period info:
    Number of observation spells: 1 
    Maximal time range observed: 0 until 2 
    Temporal mode: continuous 
    Time unit: unknown 
    Suggested time increment: NA 
  > expect_equal(as.numeric(pShiftCount(test6)),c(0,0,0,0,0,1,0,0,0,0,0,0,0))
  > 
  > test7<-networkDynamic(edge.spells=matrix(c(0,1,1,2,
  +                                            1,2,3,1,
  +                                            1,2,3,2,
  +                                            1,2,3,4
  + ),ncol=4,byrow = TRUE))
  Initializing base.net of size 4 imputed from maximum vertex id in edge records
  Created net.obs.period to describe network
   Network observation period info:
    Number of observation spells: 1 
    Maximal time range observed: 0 until 2 
    Temporal mode: continuous 
    Time unit: unknown 
    Suggested time increment: NA 
  > expect_equal(as.numeric(pShiftCount(test7)),c(0,0,0,0,0,0,1,0,0,0,0,0,0))
  > 
  > test8<-networkDynamic(edge.spells=matrix(c(0,1,1,2,
  +                                            1,2,3,1
  + ),ncol=4,byrow = TRUE))
  Initializing base.net of size 3 imputed from maximum vertex id in edge records
  Created net.obs.period to describe network
   Network observation period info:
    Number of observation spells: 1 
    Maximal time range observed: 0 until 2 
    Temporal mode: continuous 
    Time unit: unknown 
    Suggested time increment: NA 
  > expect_equal(as.numeric(pShiftCount(test8)),c(0,0,0,0,0,0,0,1,0,0,0,0,0))
  > 
  > test9<-networkDynamic(edge.spells=matrix(c(0,1,1,2,
  +                                            1,2,3,2
  + ),ncol=4,byrow = TRUE))
  Initializing base.net of size 3 imputed from maximum vertex id in edge records
  Created net.obs.period to describe network
   Network observation period info:
    Number of observation spells: 1 
    Maximal time range observed: 0 until 2 
    Temporal mode: continuous 
    Time unit: unknown 
    Suggested time increment: NA 
  > expect_equal(as.numeric(pShiftCount(test9)),c(0,0,0,0,0,0,0,0,1,0,0,0,0))
  > 
  > test10<-networkDynamic(edge.spells=matrix(c(0,1,1,2,
  +                                            1,2,3,4
  + ),ncol=4,byrow = TRUE))
  Initializing base.net of size 4 imputed from maximum vertex id in edge records
  Created net.obs.period to describe network
   Network observation period info:
    Number of observation spells: 1 
    Maximal time range observed: 0 until 2 
    Temporal mode: continuous 
    Time unit: unknown 
    Suggested time increment: NA 
  > expect_equal(as.numeric(pShiftCount(test10)),c(0,0,0,0,0,0,0,0,0,1,0,0,0))
  > 
  > test11<-networkDynamic(edge.spells=matrix(c(0,1,1,2,
  +                                            0,1,1,3,
  +                                            0,1,1,4,
  +                                            1,2,1,2
  + ),ncol=4,byrow = TRUE))
  Initializing base.net of size 4 imputed from maximum vertex id in edge records
  Created net.obs.period to describe network
   Network observation period info:
    Number of observation spells: 1 
    Maximal time range observed: 0 until 2 
    Temporal mode: continuous 
    Time unit: unknown 
    Suggested time increment: NA 
  > expect_equal(as.numeric(pShiftCount(test11)),c(0,0,0,0,0,0,0,0,0,0,1,0,0))
  > 
  > 
  > test12<-networkDynamic(edge.spells=matrix(c(0,1,1,2,
  +                                            1,2,1,2,
  +                                            1,2,1,3,
  +                                            1,2,1,4
  + ),ncol=4,byrow = TRUE))
  Initializing base.net of size 4 imputed from maximum vertex id in edge records
  Created net.obs.period to describe network
   Network observation period info:
    Number of observation spells: 1 
    Maximal time range observed: 0 until 2 
    Temporal mode: continuous 
    Time unit: unknown 
    Suggested time increment: NA 
  > expect_equal(as.numeric(pShiftCount(test12)),c(0,0,0,0,0,0,0,0,0,0,0,1,0))
  > 
  > test13<-networkDynamic(edge.spells=matrix(c(0,1,1,2,
  +                                             1,2,1,3
  + ),ncol=4,byrow = TRUE))
  Initializing base.net of size 3 imputed from maximum vertex id in edge records
  Created net.obs.period to describe network
   Network observation period info:
    Number of observation spells: 1 
    Maximal time range observed: 0 until 2 
    Temporal mode: continuous 
    Time unit: unknown 
    Suggested time increment: NA 
  > expect_equal(as.numeric(pShiftCount(test13)),c(0,0,0,0,0,0,0,0,0,0,0,0,1))
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > proc.time()
     user  system elapsed 
     2.57    0.34    2.90 
Running the tests in 'tests/reachable_tests.R' failed.
Complete output:
  > # test the forward and backward componetnt functions
  > require(tsna)
  Loading required package: tsna
  Loading required package: network
  
  'network' 1.18.2 (2023-12-04), part of the Statnet Project
  * 'news(package="network")' for changes since last version
  * 'citation("network")' for citation information
  * 'https://statnet.org' for help, support, and other information
  
  Loading required package: networkDynamic
  
  'networkDynamic' 0.11.4 (2023-12-10?), part of the Statnet Project
  * 'news(package="networkDynamic")' for changes since last version
  * 'citation("networkDynamic")' for citation information
  * 'https://statnet.org' for help, support, and other information
  
  > require(testthat)
  Loading required package: testthat
  > require(networkDynamicData)
  Loading required package: networkDynamicData
  > linegraph<-network.initialize(10)
  > add.edges(linegraph,tail=1:9,head=2:10)
  > 
  > # ---- forward.reachable tests -----
  > # test non timed version error
  > test<-linegraph
  > expect_error(forward.reachable(test,v=1),'must be a networkDynamic')
  > 
  > activate.edges(test,onset=0,terminus=3)
  > 
  > expect_equal(forward.reachable(test,v=1,per.step.depth=Inf),1:10)
  > 
  > # reverse-ordered edge spells
  > test<-linegraph
  > activate.edges(test,onset=10:0,terminus=11:1)
  > expect_equal(forward.reachable(test,v=5,per.step.depth=Inf),5:6)
  > expect_equal(forward.reachable(test,v=10,per.step.depth=Inf),10)
  > 
  > # forward-ordred edge spells
  > test<-linegraph
  > activate.edges(test,onset=0:10,terminus=1:11)
  > expect_equal(forward.reachable(test,v=5,per.step.depth=Inf),5:10)
  > expect_equal(forward.reachable(test,v=10,per.step.depth=Inf),10)
  > 
  > 
  > 
  > # test with two seeds
  > expect_equal(forward.reachable(test,v=c(1,5)),c(1,5,2,3,4,6,7,8,9,10))
  > 
  > # test on undirected case
  > test<-linegraph
  > set.network.attribute(test,'directed',FALSE)
  > activate.edges(test,onset=0,terminus=3)
  > expect_equal(forward.reachable(test,v=5,per.step.depth=Inf),c(5,4,6,3,7,2,8,1,9,10))
  > 
  > # test on network with bounded time
  > test<-linegraph
  > activate.edges(test,onset=0:10,terminus=1:11)
  > expect_equal(forward.reachable(test,v=5,start=4,end=6),c(5,6,7))
  > expect_equal(forward.reachable(test,v=1,end=6,per.step.depth=1),c(1,2,3,4,5,6,7))
  > 
  > 
  > # test with finite depthtest<-linegraph
  > test<-linegraph
  > activate.edges(test,onset=0,terminus=10)
  > expect_equal(forward.reachable(test,v=1,per.step.depth=2,end=3),1:7)
  > expect_equal(forward.reachable(test,v=1,per.step.depth=1.5,end=3),1:5)
  > 
  > test_that("test on network with two components",{
  +   test<-network.initialize(10)
  +   activate.vertices(test)
  +   test[1:5,5:1]<-1
  +   test[6:10,10:6]<-1
  +   expect_equal(forward.reachable(test,v=1),1:5)
  +   expect_equal(forward.reachable(test,v=6),6:10)
  + })
  Test passed 🎊
  > 
  > 
  > test_that("network with at spell durations",{
  +   test<-linegraph
  +   activate.edges(test,onset=0:10,terminus=0:10)
  +   expect_equal(forward.reachable(test,v=5,per.step.depth=Inf),5:10)
  +   expect_equal(forward.reachable(test,v=10,per.step.depth=Inf),10)
  +   
  + })
  Test passed 🥳
  > 
  > 
  > 
  > # test on network with net.obs.period set
  > 
  > # test on network with way too many time steps
  > data(hospital_contact)
  > #forward.reachable(hospital,v=1,start=120, end=347640,interval=300,per.step.depth=1)
  > 
  > 
  > # test that it matches infction in example network
  > 
  > data(concurrencyComparisonNets)
  > which(get.vertex.attribute.active(base,'status',at=1)==1)
  [1] 24
  > # size of forward component in base from v 24
  > sum(get.vertex.attribute.active(base,'status',at=102)==1)
  [1] 432
  > 
  > epiFound<-which(get.vertex.attribute.active(base,'status',at=102)==1)
  > fwdFound<-forward.reachable(base,v=24,per.step.depth=1,end=100)
  > expect_equal(length(setdiff(fwdFound,epiFound)),0)
  > 
  > # --- profiling -----#
  > # fiveRuns1<-function(){
  > #   forward.reachable1(base,v=1,per.step.depth=1)
  > #   forward.reachable1(base,v=2,per.step.depth=1)
  > #   forward.reachable1(base,v=3,per.step.depth=1)
  > #   forward.reachable1(base,v=4,per.step.depth=1)
  > #   forward.reachable1(base,v=5,per.step.depth=1)
  > # }
  > # fiveRuns2<-function(){
  > #   forward.reachable2(base,v=1,per.step.depth=1)
  > #   forward.reachable2(base,v=2,per.step.depth=1)
  > #   forward.reachable2(base,v=3,per.step.depth=1)
  > #   forward.reachable2(base,v=4,per.step.depth=1)
  > #   forward.reachable2(base,v=5,per.step.depth=1)
  > # }
  > # 
  > # # memory profiling
  > # Rprof(filename='fwdReachable.before')
  > # fiveRuns2()
  > # Rprof(NULL)
  > # summaryRprof(filename='fwdReachable.before')
  > 
  > # # time profiling
  > # library(microbenchmark)
  > # timing<-microbenchmark(fiveRuns1(),fiveRuns2(),times=1)
  > 
  > # ------ tests for the reachable set sizes ----
  > 
  > data(moodyContactSim)
  > expect_equal(sort(tReach(moodyContactSim)),c(2,  2,  3,  3,  3,  3,  5,  5,  6,  8, 10, 10, 14, 15, 16, 16))
  > 
  > expect_equal(sort(tReach(moodyContactSim,direction='bkwd')),c(3, 4, 5, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9))
  > 
  > 
  > 
  > 
  > proc.time()
     user  system elapsed 
     3.79    0.23    4.03