Skip to content

Commit

Permalink
as.matrix.network.adjacency() for a bipartite network no longer drops…
Browse files Browse the repository at this point in the history
… dimensions if the matrix has 1 actor and/or 1 event.

fixes #69
  • Loading branch information
krivit committed May 21, 2022
1 parent cde9375 commit 27c8857
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: network
Version: 1.17.1-685
Date: 2021-06-08
Version: 1.17.1-747
Date: 2022-05-21
Title: Classes for Relational Data
Authors@R: c(
person("Carter T.", "Butts", role=c("aut","cre"), email="buttsc@uci.edu"),
Expand Down
2 changes: 1 addition & 1 deletion R/coercion.R
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ as.matrix.network.adjacency<-function(x,attrname=NULL,expand.bipartite=FALSE,...
if(is.bipartite(x)&(!expand.bipartite)){
nactors <- get.network.attribute(x, "bipartite")
nevents <- network.size(x) - nactors
m <- m[0:nactors, nactors+(1:nevents)]
m <- m[1:nactors, nactors+(1:nevents), drop=FALSE]
}
#Return the result
m
Expand Down

0 comments on commit 27c8857

Please sign in to comment.