Running ‘testthat.R’ [3s/6s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(gwdegree)
  Loading required package: ergm
  Loading required package: network
  network: Classes for Relational Data
  Version 1.16.1 created on 2020-10-06.
  copyright (c) 2005, Carter T. Butts, University of California-Irvine
                      Mark S. Handcock, University of California -- Los Angeles
                      David R. Hunter, Penn State University
                      Martina Morris, University of Washington
                      Skye Bender-deMoll, University of Washington
   For citation information, type citation("network").
   Type help("network-package") to get started.
  
  
  ergm: version 3.11.0, created on 2020-10-14
  Copyright (c) 2020, Mark S. Handcock, University of California -- Los Angeles
                      David R. Hunter, Penn State University
                      Carter T. Butts, University of California -- Irvine
                      Steven M. Goodreau, University of Washington
                      Pavel N. Krivitsky, UNSW Sydney
                      Martina Morris, University of Washington
                      with contributions from
                      Li Wang
                      Kirk Li, University of Washington
                      Skye Bender-deMoll, University of Washington
                      Chad Klumb
                      Michał Bojanowski, Kozminski University
                      Ben Bolker
  Based on "statnet" project software (statnet.org).
  For license and citation information see statnet.org/attribution
  or type citation("ergm").
  
  NOTE: Versions before 3.6.1 had a bug in the implementation of the bd()
  constraint which distorted the sampled distribution somewhat. In
  addition, Sampson's Monks datasets had mislabeled vertices. See the
  NEWS and the documentation for more details.
  
  NOTE: Some common term arguments pertaining to vertex attribute and
  level selection have changed in 3.10.0. See terms help for more
  details. Use 'options(ergm.term=list(version="3.9.4"))' to use old
  behavior.
  
  Loading required package: ggplot2
  Loading required package: magrittr
  
  Attaching package: 'magrittr'
  
  The following objects are masked from 'package:testthat':
  
      equals, is_less_than, not
  
  Loading required package: shiny
  Loading required package: shinydashboard
  
  Attaching package: 'shinydashboard'
  
  The following object is masked from 'package:graphics':
  
      box
  
  > 
  > test_check("gwdegree")
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (???): A complete graph of random size has a clustering coefficient of 1 ──
  Error: attempt to set index 0/0 in SET_VECTOR_ELT
  Backtrace:
       █
    1. ├─testthat::expect_equal(...)
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─gwdegree:::clusteringCoef(network(nNodes, density = 1, directed = FALSE))
    5. │ ├─base::unname(3 * summary(net ~ triangles)/summary(net ~ twopath))
    6. │ ├─base::summary(net ~ triangles)
    7. │ └─ergm:::summary.formula(net ~ triangles)
    8. │   └─ergm::summary_formula(object, ...)
    9. │     └─statnet.common::eval_lhs.formula(object)
   10. │       └─base::eval(object[[2L]], envir = environment(object))
   11. │         └─base::eval(object[[2L]], envir = environment(object))
   12. └─network::network(nNodes, density = 1, directed = FALSE)
   13.   ├─network::as.network(...)
   14.   └─ergm:::as.network.numeric(...)
   15.     └─network::network(...)
   16.       ├─network::as.network(...)
   17.       └─network::as.network.matrix(...)
   18.         └─network::network.initialize(...)
   19.           └─network::set.vertex.attribute(g, "na", rep(FALSE, n), 1:n)
  ── Error (???): A graph with a single two-path has a clustering coefficient of 0 ──
  Error: attempt to set index 0/0 in SET_VECTOR_ELT
  Backtrace:
       █
    1. ├─testthat::expect_equal(...)
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─gwdegree:::clusteringCoef(network(3, numedges = 2, directed = FALSE))
    5. │ ├─base::unname(3 * summary(net ~ triangles)/summary(net ~ twopath))
    6. │ ├─base::summary(net ~ triangles)
    7. │ └─ergm:::summary.formula(net ~ triangles)
    8. │   └─ergm::summary_formula(object, ...)
    9. │     └─statnet.common::eval_lhs.formula(object)
   10. │       └─base::eval(object[[2L]], envir = environment(object))
   11. │         └─base::eval(object[[2L]], envir = environment(object))
   12. └─network::network(3, numedges = 2, directed = FALSE)
   13.   ├─network::as.network(...)
   14.   └─ergm:::as.network.numeric(...)
   15.     └─network::network(...)
   16.       ├─network::as.network(...)
   17.       └─network::as.network.matrix(...)
   18.         └─network::network.initialize(...)
   19.           └─network::set.vertex.attribute(g, "na", rep(FALSE, n), 1:n)
  ── Error (???): Clustering coefficient can't be calculated for an empty graph of random size ──
  Error: attempt to set index 0/0 in SET_VECTOR_ELT
  Backtrace:
       █
    1. ├─testthat::expect_true(...)
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─gwdegree:::clusteringCoef(network(nNodes, density = 0, directed = FALSE))
    5. │ ├─base::unname(3 * summary(net ~ triangles)/summary(net ~ twopath))
    6. │ ├─base::summary(net ~ triangles)
    7. │ └─ergm:::summary.formula(net ~ triangles)
    8. │   └─ergm::summary_formula(object, ...)
    9. │     └─statnet.common::eval_lhs.formula(object)
   10. │       └─base::eval(object[[2L]], envir = environment(object))
   11. │         └─base::eval(object[[2L]], envir = environment(object))
   12. └─network::network(nNodes, density = 0, directed = FALSE)
   13.   ├─network::as.network(...)
   14.   └─ergm:::as.network.numeric(...)
   15.     └─network::network(...)
   16.       ├─network::as.network(...)
   17.       └─network::as.network.matrix(...)
   18.         └─network::network.initialize(...)
   19.           └─network::set.vertex.attribute(g, "na", rep(FALSE, n), 1:n)
  ── Error (test_degCent.R:4:1): (code run outside of `test_that()`) ─────────────
  Error: attempt to set index 0/0 in SET_VECTOR_ELT
  Backtrace:
      █
   1. └─gwdegree:::makeNetwork(100, 0) test_degCent.R:4:0
   2.   └─network::network(m, directed = FALSE)
   3.     ├─network::as.network(...)
   4.     └─network::as.network.matrix(...)
   5.       └─network::network.initialize(...)
   6.         └─network::set.vertex.attribute(g, "na", rep(FALSE, n), 1:n)
  ── Error (test_deltaGWD.R:8:15): Deleting an edge: deltaGWD() matches simulation-based calculation for a random dyad in random network with a random decay-parameter value in [0, 3]. ──
  Error: attempt to set index 0/0 in SET_VECTOR_ELT
  Backtrace:
      █
   1. └─network::network(...) test_deltaGWD.R:8:14
   2.   ├─network::as.network(...)
   3.   └─ergm:::as.network.numeric(...)
   4.     └─network::network(...)
   5.       ├─network::as.network(...)
   6.       └─network::as.network.matrix(...)
   7.         └─network::network.initialize(...)
   8.           └─network::set.vertex.attribute(g, "na", rep(FALSE, n), 1:n)
  ── Error (test_deltaGWD.R:28:15): Adding an edge: deltaGWD() matches simulation-based calculation for a random dyad in random network with a random decay-parameter value in [0, 3]. ──
  Error: attempt to set index 0/0 in SET_VECTOR_ELT
  Backtrace:
      █
   1. └─network::network(...) test_deltaGWD.R:28:14
   2.   ├─network::as.network(...)
   3.   └─ergm:::as.network.numeric(...)
   4.     └─network::network(...)
   5.       ├─network::as.network(...)
   6.       └─network::as.network.matrix(...)
   7.         └─network::network.initialize(...)
   8.           └─network::set.vertex.attribute(g, "na", rep(FALSE, n), 1:n)
  ── Error (???): makeNetwork makes a network object ─────────────────────────────
  Error: attempt to set index 0/0 in SET_VECTOR_ELT
  Backtrace:
      █
   1. ├─testthat::expect_is(...)
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─gwdegree:::makeNetwork(nNodes, runif(1, 0.01, 0.5))
   5.   └─network::network(m, directed = FALSE)
   6.     ├─network::as.network(...)
   7.     └─network::as.network.matrix(...)
   8.       └─network::network.initialize(...)
   9.         └─network::set.vertex.attribute(g, "na", rep(FALSE, n), 1:n)
  ── Error (???): makeNetwork makes an empty graph if density is zero ────────────
  Error: attempt to set index 0/0 in SET_VECTOR_ELT
  Backtrace:
       █
    1. ├─testthat::expect_equal(...)
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─network::network.edgecount(makeNetwork(nNodes, 0))
    5. └─gwdegree:::makeNetwork(nNodes, 0)
    6.   └─network::network(m, directed = FALSE)
    7.     ├─network::as.network(...)
    8.     └─network::as.network.matrix(...)
    9.       └─network::network.initialize(...)
   10.         └─network::set.vertex.attribute(g, "na", rep(FALSE, n), 1:n)
  ── Error (???): makeNetwork makes a complete graph if density is one ───────────
  Error: attempt to set index 0/0 in SET_VECTOR_ELT
  Backtrace:
       █
    1. ├─testthat::expect_equal(...)
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─network::network.edgecount(makeNetwork(nNodes, 1))
    5. └─gwdegree:::makeNetwork(nNodes, 1)
    6.   └─network::network(m, directed = FALSE)
    7.     ├─network::as.network(...)
    8.     └─network::as.network.matrix(...)
    9.       └─network::network.initialize(...)
   10.         └─network::set.vertex.attribute(g, "na", rep(FALSE, n), 1:n)
  
  [ FAIL 9 | WARN 0 | SKIP 0 | PASS 0 ]
  Error: Test failures
  Execution halted