Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/plot.common.R
Original file line number Diff line number Diff line change
Expand Up @@ -4841,7 +4841,7 @@ curve_multiple <- function(graph, start = 0.5) {
16777215L,
16777215L
),
.Dim = c(64L, 64L),
dim = c(64L, 64L),
class = "nativeRaster",
channels = 4L
)
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/helper-test-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ karate_oldstyle <- structure(
Citation = "Wayne W. Zachary. An Information Flow Model for Conflict and Fission in Small Groups. Journal of Anthropological Research Vol. 33, No. 4 452-473",
Author = "Wayne W. Zachary"
),
.Names = c("name", "Citation", "Author")
names = c("name", "Citation", "Author")
),
structure(
list(
Expand All @@ -254,7 +254,7 @@ karate_oldstyle <- structure(
),
name = karate_oldstyle_names
),
.Names = c("Faction", "name")
names = c("Faction", "name")
),
structure(
list(
Expand All @@ -266,7 +266,7 @@ karate_oldstyle <- structure(
2, 7, 4, 2, 4, 2, 2, 4, 2, 3, 3, 4, 4, 5
)
),
.Names = "weight"
names = "weight"
)
)
),
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-attributes.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ test_that("bracketing works with shortcuts (not changing attribute of similar gr
test_that("we can query all attributes at once", {
g <- make_graph(c(1, 2, 1, 3, 2, 4))

expect_equal(graph_attr(g), structure(list(), .Names = character(0)))
expect_equal(graph_attr(g), structure(list(), names = character(0)))
expect_equal(unname(vertex_attr(g)), list())
expect_equal(unname(edge_attr(g)), list())

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-centrality.R
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ test_that("eigen_centrality() works", {
evc,
structure(
c(0.732, 0.732, 0.594, 1, 0.827, 0.594, 0.827, 0.407, 0.1, 0.023),
.Names = c("Andre", "Beverly", "Carol", "Diane", "Fernando", "Ed", "Garth", "Heather", "Ike", "Jane")
names = c("Andre", "Beverly", "Carol", "Diane", "Fernando", "Ed", "Garth", "Heather", "Ike", "Jane")
)
)

Expand Down Expand Up @@ -857,7 +857,7 @@ test_that("arpack works for non-symmetric matrices", {
1, -4, 9, -2, 10, 1, -7, 7, 6, 7, -3, 0, 9, -5, -8, 1, -3,
-3, -8, -7, -8, 10, 8, 7, 0, 6, -7, -8, 10, 10, 1, 0, -2, 6
),
.Dim = c(10L, 10L)
dim = c(10L, 10L)
)

f <- function(x, extra = NULL) A %*% x
Expand Down
46 changes: 23 additions & 23 deletions tests/testthat/test-community.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ test_that("communities function works", {
`3` = c(9L, 10L, 15L, 16L, 19L, 21L, 23L, 27L, 30L, 31L, 33L, 34L),
`4` = c(24L, 25L, 26L, 28L, 29L, 32L)
),
.Dim = 4L,
.Dimnames = list(c("1", "2", "3", "4"))
dim = 4L,
dimnames = list(c("1", "2", "3", "4"))
)
)

Expand All @@ -116,8 +116,8 @@ test_that("communities function works", {
`1` = letters[1:5],
`2` = letters[6:10]
),
.Dim = 2L,
.Dimnames = list(c("1", "2"))
dim = 2L,
dimnames = list(c("1", "2"))
)
)
})
Expand Down Expand Up @@ -249,10 +249,10 @@ test_that("cluster_leading_eigen works", {
sizes(karate_lc),
structure(
c(7L, 12L, 9L, 6L),
.Dim = 4L,
.Dimnames = structure(
dim = 4L,
dimnames = structure(
list(`Community sizes` = c("1", "2", "3", "4")),
.Names = "Community sizes"
names = "Community sizes"
),
class = "table"
)
Expand Down Expand Up @@ -421,10 +421,10 @@ test_that("cluster_leiden works", {
sizes(karate_leiden),
structure(
c(17L, 17L),
.Dim = 2L,
.Dimnames = structure(
dim = 2L,
dimnames = structure(
list(`Community sizes` = c("1", "2")),
.Names = "Community sizes"
names = "Community sizes"
),
class = "table"
)
Expand All @@ -445,10 +445,10 @@ test_that("cluster_leiden works", {
sizes(karate_leiden_mod),
structure(
c(11L, 5L, 12L, 6L),
.Dim = 4L,
.Dimnames = structure(
dim = 4L,
dimnames = structure(
list(`Community sizes` = c("1", "2", "3", "4")),
.Names = "Community sizes"
names = "Community sizes"
),
class = "table"
)
Expand Down Expand Up @@ -525,10 +525,10 @@ test_that("cluster_optimal works", {
sizes(karate_optimal),
structure(
c(11L, 5L, 12L, 6L),
.Dim = 4L,
.Dimnames = structure(
dim = 4L,
dimnames = structure(
list(`Community sizes` = c("1", "2", "3", "4")),
.Names = "Community sizes"
names = "Community sizes"
),
class = "table"
)
Expand Down Expand Up @@ -569,10 +569,10 @@ test_that("cluster_walktrap works", {
sizes(karate_walktrap),
structure(
c(9L, 7L, 9L, 4L, 5L),
.Dim = 5L,
.Dimnames = structure(
dim = 5L,
dimnames = structure(
list(`Community sizes` = c("1", "2", "3", "4", "5")),
.Names = "Community sizes"
names = "Community sizes"
),
class = "table"
)
Expand Down Expand Up @@ -608,8 +608,8 @@ test_that("groups works", {
gr,
structure(
list(`1` = 1:10, `2` = 11:15),
.Dim = 2L,
.Dimnames = list(c("1", "2"))
dim = 2L,
dimnames = list(c("1", "2"))
)
)

Expand All @@ -620,8 +620,8 @@ test_that("groups works", {
gr,
structure(
list(`1` = letters[1:10], `2` = letters[11:15]),
.Dim = 2L,
.Dimnames = list(c("1", "2"))
dim = 2L,
dimnames = list(c("1", "2"))
)
)
})
Expand Down
8 changes: 4 additions & 4 deletions tests/testthat/test-conversion.R
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ test_that("edge names work", {
g2 <- delete_edges(g, c("b", "d", "e"))
expect_equal(
as_edgelist(g2),
structure(c(1, 3, 6, 7, 8, 9, 1, 2, 4, 7, 8, 9, 10, 10), .Dim = c(7L, 2L))
structure(c(1, 3, 6, 7, 8, 9, 1, 2, 4, 7, 8, 9, 10, 10), dim = c(7L, 2L))
)

## named vertices
Expand All @@ -816,7 +816,7 @@ test_that("edge names work", {
as_edgelist(g3),
structure(
c("c", "d", "e", "g", "h", "i", "a", "d", "e", "f", "h", "i", "j", "j"),
.Dim = c(7L, 2L)
dim = c(7L, 2L)
)
)

Expand All @@ -825,7 +825,7 @@ test_that("edge names work", {
g4 <- delete_edges(g, c("1|2", "8|7", "1|10"))
expect_equal(
as_edgelist(g4),
structure(c(2, 3, 4, 5, 6, 8, 9, 3, 4, 5, 6, 7, 9, 10), .Dim = c(7L, 2L))
structure(c(2, 3, 4, 5, 6, 8, 9, 3, 4, 5, 6, 7, 9, 10), dim = c(7L, 2L))
)

## mix edge names and vertex names
Expand All @@ -837,7 +837,7 @@ test_that("edge names work", {
as_edgelist(g5),
structure(
c("b", "c", "d", "e", "g", "h", "a", "c", "d", "e", "f", "h", "i", "j"),
.Dim = c(7L, 2L)
dim = c(7L, 2L)
)
)
})
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-flow.R
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ test_that("dominator_tree works -- legacy", {
as_edgelist(dtree$domtree),
structure(
c("R", "R", "R", "R", "R", "C", "C", "D", "R", "R", "G", "R", "A", "B", "C", "D", "E", "F", "G", "L", "H", "I", "J", "K"),
.Dim = c(12L, 2L)
dim = c(12L, 2L)
)
)
})
Expand Down
8 changes: 4 additions & 4 deletions tests/testthat/test-indexing.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ test_that("[ indexing works with logical vectors", {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0
),
.Dim = c(2L, 20L),
.Dimnames = list(
dim = c(2L, 20L),
dimnames = list(
c("b", "c"),
c(
"a", "b", "c",
Expand All @@ -77,8 +77,8 @@ test_that("[ indexing works with negative indices", {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0
),
.Dim = c(2L, 19L),
.Dimnames = list(
dim = c(2L, 19L),
dimnames = list(
c("b", "c"),
c(
"b", "c", "d", "e", "f", "g", "h", "i", "j",
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-make.R
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ test_that("make_kautz_graph works", {
20, 21, 22, 23, 24, 1, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15, 16
),
.Dim = c(48L, 2L)
dim = c(48L, 2L)
)
)
})
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-structural-properties.R
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ test_that("transitivity() works", {
t33 <- transitivity(g, type = "local")
est3 <- structure(
c(0, 0.06667, 0.1028, 0.1016, 0.1333, 0.2222),
.Names = c(
names = c(
"Min.",
"1st Qu.",
"Median",
Expand Down Expand Up @@ -1058,7 +1058,7 @@ test_that("knn works", {
knn = c(1, rep(9, 9)),
knnk = c(9, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 1)
),
.Names = c("knn", "knnk")
names = c("knn", "knnk")
)
)
})
Expand Down
Loading