Skip to content

Commit

Permalink
Updates to pass R CMD Check with new network
Browse files Browse the repository at this point in the history
  • Loading branch information
smjenness committed Dec 17, 2024
1 parent cef49ab commit d5dcfe0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ Imports:
dplyr
Suggests:
testthat
RoxygenNote: 7.3.2.9000
RoxygenNote: 7.3.2
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Remotes:
github::statnet/statnet.common@master,
github::statnet/network@master
github::statnet/statnet.common@master
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ S3method(add.edges,networkLite)
S3method(add.vertices,networkLite)
S3method(as.edgelist,networkLite)
S3method(as.matrix,networkLite)
S3method(as.matrix,networkLite.adjacency)
S3method(as.matrix,networkLite.edgelist)
S3method(as.matrix,networkLite.incidence)
S3method(as.network,networkLite)
S3method(as.networkLite,network)
S3method(as.networkLite,networkLite)
Expand Down
3 changes: 3 additions & 0 deletions R/matrix_conversions.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ as.matrix.networkLite <- function(x,
edgelist = as.matrix.networkLite.edgelist(x, attrname, ...))
}

#' @export
as.matrix.networkLite.adjacency <- function(x, attrname = NULL, ...) {
el <- as.edgelist(x, na.rm = FALSE)

Expand Down Expand Up @@ -127,6 +128,7 @@ as.matrix.networkLite.adjacency <- function(x, attrname = NULL, ...) {
}
}

#' @export
as.matrix.networkLite.incidence <- function(x, attrname = NULL, ...) {
el <- as.edgelist(x, na.rm = FALSE)

Expand All @@ -143,6 +145,7 @@ as.matrix.networkLite.incidence <- function(x, attrname = NULL, ...) {
m
}

#' @export
as.matrix.networkLite.edgelist <- function(x, attrname = NULL,
na.rm = TRUE, ...) {

Expand Down
1 change: 1 addition & 0 deletions networkLite.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: 4584846e-a1cd-4ea7-a3fe-12c82787826e

RestoreWorkspace: Default
SaveWorkspace: Default
Expand Down

0 comments on commit d5dcfe0

Please sign in to comment.