Running 'testthat.R' [2s/3s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(sankey)
  > 
  > test_check("sankey")
  == Failed tests ================================================================
  -- Error (test-make.R:7:3): make_sankey ----------------------------------------
  Error: 'names' attribute [21] must be the same length as the vector [0]
  Backtrace:
       x
    1. \-sankey::make_sankey(ne$nodes, ne$edges, y = "simple") test-make.R:7:2
    2.   +-nodes[["size"]] %||% optimize_sizes(nodes, edges)
    3.   \-sankey:::optimize_sizes(nodes, edges)
    4.     \-simplegraph::strength(sgraph, mode = "in")
    5.       \-simplegraph::incident_edges(graph, mode = mode)
    6.         \-simplegraph::vertex_ids(graph)
    7.           +-simplegraph:::as_graph_adjlist(graph)
    8.           \-simplegraph:::as_graph_adjlist.simplegraph_df(graph)
    9.             +-utils::modifyList(...)
   10.             | \-base::stopifnot(is.list(x), is.list(val))
   11.             \-base::structure(replicate(nrow(x$nodes), character()), names = x$nodes[[1]])
  -- Error (test-make.R:31:3): make_sankey handles nodes = NULL ------------------
  Error: 'names' attribute [21] must be the same length as the vector [0]
  Backtrace:
       x
    1. \-sankey::make_sankey(ne$nodes, ne$edges, y = "simple") test-make.R:31:2
    2.   +-nodes[["size"]] %||% optimize_sizes(nodes, edges)
    3.   \-sankey:::optimize_sizes(nodes, edges)
    4.     \-simplegraph::strength(sgraph, mode = "in")
    5.       \-simplegraph::incident_edges(graph, mode = mode)
    6.         \-simplegraph::vertex_ids(graph)
    7.           +-simplegraph:::as_graph_adjlist(graph)
    8.           \-simplegraph:::as_graph_adjlist.simplegraph_df(graph)
    9.             +-utils::modifyList(...)
   10.             | \-base::stopifnot(is.list(x), is.list(val))
   11.             \-base::structure(replicate(nrow(x$nodes), character()), names = x$nodes[[1]])
  -- Error (test-make.R:53:3): breaking edges works ------------------------------
  Error: 'names' attribute [21] must be the same length as the vector [0]
  Backtrace:
      x
   1. +-nodes$size %||% optimize_sizes(nodes, edges) test-make.R:53:2
   2. \-sankey:::optimize_sizes(nodes, edges)
   3.   \-simplegraph::strength(sgraph, mode = "in")
   4.     \-simplegraph::degree(graph = graph, mode = mode)
   5.       +-simplegraph:::as_graph_adjlist(graph)
   6.       \-simplegraph:::as_graph_adjlist.simplegraph_df(graph)
   7.         +-utils::modifyList(...)
   8.         | \-base::stopifnot(is.list(x), is.list(val))
   9.         \-base::structure(replicate(nrow(x$nodes), character()), names = x$nodes[[1]])
  -- Error (test-make.R:73:3): breaking edges if requested -----------------------
  Error: 'names' attribute [21] must be the same length as the vector [0]
  Backtrace:
       x
    1. \-sankey::make_sankey(nodes, edges, break_edges = TRUE) test-make.R:73:2
    2.   +-nodes[["size"]] %||% optimize_sizes(nodes, edges)
    3.   \-sankey:::optimize_sizes(nodes, edges)
    4.     \-simplegraph::strength(sgraph, mode = "in")
    5.       \-simplegraph::incident_edges(graph, mode = mode)
    6.         \-simplegraph::vertex_ids(graph)
    7.           +-simplegraph:::as_graph_adjlist(graph)
    8.           \-simplegraph:::as_graph_adjlist.simplegraph_df(graph)
    9.             +-utils::modifyList(...)
   10.             | \-base::stopifnot(is.list(x), is.list(val))
   11.             \-base::structure(replicate(nrow(x$nodes), character()), names = x$nodes[[1]])
  -- Error (test-optimize-size.R:8:3): optimize_sizes ----------------------------
  Error: 'names' attribute [21] must be the same length as the vector [0]
  Backtrace:
      x
   1. \-sankey:::optimize_sizes(nodes_edges$nodes, nodes_edges$edges) test-optimize-size.R:8:2
   2.   \-simplegraph::strength(sgraph, mode = "in")
   3.     \-simplegraph::degree(graph = graph, mode = mode)
   4.       +-simplegraph:::as_graph_adjlist(graph)
   5.       \-simplegraph:::as_graph_adjlist.simplegraph_df(graph)
   6.         +-utils::modifyList(...)
   7.         | \-base::stopifnot(is.list(x), is.list(val))
   8.         \-base::structure(replicate(nrow(x$nodes), character()), names = x$nodes[[1]])
  -- Error (test-optimize-y-optim.R:150:3): optimize_y_optim ---------------------
  Error: 'names' attribute [9] must be the same length as the vector [0]
  Backtrace:
      x
   1. \-sankey:::y_optim_data2() test-optimize-y-optim.R:150:2
   2.   \-sankey:::optimize_sizes(nodes, edges) helper-y-optim.R:34:2
   3.     \-simplegraph::strength(sgraph, mode = "in")
   4.       \-simplegraph::degree(graph = graph, mode = mode)
   5.         +-simplegraph:::as_graph_adjlist(graph)
   6.         \-simplegraph:::as_graph_adjlist.simplegraph_df(graph)
   7.           +-utils::modifyList(...)
   8.           | \-base::stopifnot(is.list(x), is.list(val))
   9.           \-base::structure(replicate(nrow(x$nodes), character()), names = x$nodes[[1]])
  -- Error (test-sankey.R:10:3): sankey plots nicely -----------------------------
  Error: 'names' attribute [21] must be the same length as the vector [0]
  Backtrace:
       x
    1. \-sankey::make_sankey(ne$nodes, ne$edges, break_edges = FALSE) test-sankey.R:10:2
    2.   +-nodes[["size"]] %||% optimize_sizes(nodes, edges)
    3.   \-sankey:::optimize_sizes(nodes, edges)
    4.     \-simplegraph::strength(sgraph, mode = "in")
    5.       \-simplegraph::incident_edges(graph, mode = mode)
    6.         \-simplegraph::vertex_ids(graph)
    7.           +-simplegraph:::as_graph_adjlist(graph)
    8.           \-simplegraph:::as_graph_adjlist.simplegraph_df(graph)
    9.             +-utils::modifyList(...)
   10.             | \-base::stopifnot(is.list(x), is.list(val))
   11.             \-base::structure(replicate(nrow(x$nodes), character()), names = x$nodes[[1]])
  -- Error (test-sankey.R:21:3): plot.sankey plots nicely ------------------------
  Error: 'names' attribute [21] must be the same length as the vector [0]
  Backtrace:
       x
    1. \-sankey::make_sankey(ne$nodes, ne$edges, break_edges = FALSE) test-sankey.R:21:2
    2.   +-nodes[["size"]] %||% optimize_sizes(nodes, edges)
    3.   \-sankey:::optimize_sizes(nodes, edges)
    4.     \-simplegraph::strength(sgraph, mode = "in")
    5.       \-simplegraph::incident_edges(graph, mode = mode)
    6.         \-simplegraph::vertex_ids(graph)
    7.           +-simplegraph:::as_graph_adjlist(graph)
    8.           \-simplegraph:::as_graph_adjlist.simplegraph_df(graph)
    9.             +-utils::modifyList(...)
   10.             | \-base::stopifnot(is.list(x), is.list(val))
   11.             \-base::structure(replicate(nrow(x$nodes), character()), names = x$nodes[[1]])
  -- Error (test-sankey.R:34:3): sankey plots with points as nodes ---------------
  Error: 'names' attribute [21] must be the same length as the vector [0]
  Backtrace:
       x
    1. \-sankey::make_sankey(ne$nodes, ne$edges, break_edges = FALSE) test-sankey.R:34:2
    2.   +-nodes[["size"]] %||% optimize_sizes(nodes, edges)
    3.   \-sankey:::optimize_sizes(nodes, edges)
    4.     \-simplegraph::strength(sgraph, mode = "in")
    5.       \-simplegraph::incident_edges(graph, mode = mode)
    6.         \-simplegraph::vertex_ids(graph)
    7.           +-simplegraph:::as_graph_adjlist(graph)
    8.           \-simplegraph:::as_graph_adjlist.simplegraph_df(graph)
    9.             +-utils::modifyList(...)
   10.             | \-base::stopifnot(is.list(x), is.list(val))
   11.             \-base::structure(replicate(nrow(x$nodes), character()), names = x$nodes[[1]])
  -- Error (test-sankey.R:54:3): better optimizing edge placement ----------------
  Error: 'names' attribute [7] must be the same length as the vector [0]
  Backtrace:
       x
    1. \-sankey::make_sankey(nodes, edges, break_edges = TRUE, gravity = "center") test-sankey.R:54:2
    2.   +-nodes[["size"]] %||% optimize_sizes(nodes, edges)
    3.   \-sankey:::optimize_sizes(nodes, edges)
    4.     \-simplegraph::strength(sgraph, mode = "in")
    5.       \-simplegraph::incident_edges(graph, mode = mode)
    6.         \-simplegraph::vertex_ids(graph)
    7.           +-simplegraph:::as_graph_adjlist(graph)
    8.           \-simplegraph:::as_graph_adjlist.simplegraph_df(graph)
    9.             +-utils::modifyList(...)
   10.             | \-base::stopifnot(is.list(x), is.list(val))
   11.             \-base::structure(replicate(nrow(x$nodes), character()), names = x$nodes[[1]])
  -- Error (test-x-coords.R:8:3): optimize_x works -------------------------------
  Error: 'names' attribute [21] must be the same length as the vector [0]
  Backtrace:
      x
   1. \-sankey:::optimize_x(nodes_edges$nodes, nodes_edges$edges) test-x-coords.R:8:2
   2.   \-simplegraph::predecessors(sgraph)
   3.     +-simplegraph:::as_graph_adjlist(graph)
   4.     \-simplegraph:::as_graph_adjlist.simplegraph_df(graph)
   5.       +-utils::modifyList(...)
   6.       | \-base::stopifnot(is.list(x), is.list(val))
   7.       \-base::structure(replicate(nrow(x$nodes), character()), names = x$nodes[[1]])
  -- Error (test-y-coords.R:7:3): optimize_y -------------------------------------
  Error: 'names' attribute [21] must be the same length as the vector [0]
  Backtrace:
      x
   1. \-sankey:::optimize_x(ne$nodes, ne$edges) test-y-coords.R:7:2
   2.   \-simplegraph::predecessors(sgraph)
   3.     +-simplegraph:::as_graph_adjlist(graph)
   4.     \-simplegraph:::as_graph_adjlist.simplegraph_df(graph)
   5.       +-utils::modifyList(...)
   6.       | \-base::stopifnot(is.list(x), is.list(val))
   7.       \-base::structure(replicate(nrow(x$nodes), character()), names = x$nodes[[1]])
  -- Error (test-y-coords.R:34:3): optimize_y ------------------------------------
  Error: 'names' attribute [21] must be the same length as the vector [0]
  Backtrace:
      x
   1. \-sankey:::optimize_x(ne$nodes, ne$edges) test-y-coords.R:34:2
   2.   \-simplegraph::predecessors(sgraph)
   3.     +-simplegraph:::as_graph_adjlist(graph)
   4.     \-simplegraph:::as_graph_adjlist.simplegraph_df(graph)
   5.       +-utils::modifyList(...)
   6.       | \-base::stopifnot(is.list(x), is.list(val))
   7.       \-base::structure(replicate(nrow(x$nodes), character()), names = x$nodes[[1]])
  -- Error (test-y-coords.R:58:3): optimize_y (simple) uses supplied y coordinates --
  Error: 'names' attribute [21] must be the same length as the vector [0]
  Backtrace:
      x
   1. \-sankey:::optimize_x(ne$nodes, ne$edges) test-y-coords.R:58:2
   2.   \-simplegraph::predecessors(sgraph)
   3.     +-simplegraph:::as_graph_adjlist(graph)
   4.     \-simplegraph:::as_graph_adjlist.simplegraph_df(graph)
   5.       +-utils::modifyList(...)
   6.       | \-base::stopifnot(is.list(x), is.list(val))
   7.       \-base::structure(replicate(nrow(x$nodes), character()), names = x$nodes[[1]])
  -- Error (test-y-coords.R:102:3): optomize_y (simple) top, bottom and center ---
  Error: 'names' attribute [21] must be the same length as the vector [0]
  Backtrace:
      x
   1. \-sankey:::optimize_x(ne$nodes, ne$edges) test-y-coords.R:102:2
   2.   \-simplegraph::predecessors(sgraph)
   3.     +-simplegraph:::as_graph_adjlist(graph)
   4.     \-simplegraph:::as_graph_adjlist.simplegraph_df(graph)
   5.       +-utils::modifyList(...)
   6.       | \-base::stopifnot(is.list(x), is.list(val))
   7.       \-base::structure(replicate(nrow(x$nodes), character()), names = x$nodes[[1]])
  
  [ FAIL 15 | WARN 0 | SKIP 0 | PASS 92 ]
  Error: Test failures
  Execution halted