Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to pass R CMD Check with new network version #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
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
Loading