Skip to content

Commit 6c2bbf0

Browse files
committed
Turns out that the environment variable I needed was actually
_R_CLASS_MATRIX_ARRAY_, not R_CLASS_MATRIX_ARRAY. With that fixed, it now passes R CMD check --as-cran on both release and R-devel locally. I am now getting the bizarre error on WinBuilder in which tests fail on i386 with no information or error messages (the tests are never run), though the 64-bit platform seems fine. No idea what is up with that.
1 parent 2e1e934 commit 6c2bbf0

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: network
22
Version: 1.16.0
3-
Date: 2019-11-26
3+
Date: 2019-11-28
44
Title: Classes for Relational Data
55
Authors@R: c(
66
person("Carter T.", "Butts", role=c("aut","cre"), email="buttsc@uci.edu"),

tests/as.edgelist_tests.R

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ set.edge.attribute(test,'weight',10:11)
1212

1313
expect_equal(as.matrix.network.edgelist(test),structure(c(5L, 1L, 1L, 5L), .Dim = c(2L, 2L), n = 5, vnames = 1:5))
1414
# sort order should be different
15-
if(length(Sys.getenv("R_CLASS_MATRIX_ARRAY"))>0){
15+
if(Sys.getenv("_R_CLASS_MATRIX_ARRAY_")==""){
1616
expect_equal(as.edgelist(test),structure(c(1L, 5L, 5L, 1L), .Dim = c(2L, 2L), n = 5, vnames = 1:5, directed = TRUE, bipartite = FALSE, loops = FALSE, class = c("edgelist","matrix")))
1717
}else{
1818
expect_equal(as.edgelist(test),structure(c(1L, 5L, 5L, 1L), .Dim = c(2L, 2L), n = 5, vnames = 1:5, directed = TRUE, bipartite = FALSE, loops = FALSE, class = c("edgelist","matrix","array")))
@@ -47,4 +47,9 @@ as.edgelist(network.initialize(0))
4747
deledge<-network.initialize(5)
4848
add.edges(deledge,1:3,2:4)
4949
delete.edges(deledge,2)
50-
expect_equal(as.edgelist(deledge),structure(c(1L, 3L, 2L, 4L), .Dim = c(2L, 2L), n = 5, vnames = 1:5, directed = TRUE, bipartite = FALSE, loops = FALSE, class = c("edgelist", "matrix")))
50+
if(Sys.getenv("_R_CLASS_MATRIX_ARRAY_")==""){
51+
expect_equal(as.edgelist(deledge),structure(c(1L, 3L, 2L, 4L), .Dim = c(2L, 2L), n = 5, vnames = 1:5, directed = TRUE, bipartite = FALSE, loops = FALSE, class = c("edgelist", "matrix")))
52+
}else{
53+
expect_equal(as.edgelist(deledge),structure(c(1L, 3L, 2L, 4L), .Dim = c(2L, 2L), n = 5, vnames = 1:5, directed = TRUE, bipartite = FALSE, loops = FALSE, class = c("edgelist", "matrix", "array")))
54+
}
55+

0 commit comments

Comments
 (0)