From d5dcfe0eae0510ca1e2fccc7f0ee806451994342 Mon Sep 17 00:00:00 2001 From: Samuel Jenness Date: Tue, 17 Dec 2024 10:14:30 -0500 Subject: [PATCH] Updates to pass R CMD Check with new network --- DESCRIPTION | 5 ++--- NAMESPACE | 3 +++ R/matrix_conversions.R | 3 +++ networkLite.Rproj | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index d0bb2f9..56e681c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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 diff --git a/NAMESPACE b/NAMESPACE index 89a03c8..5a3f26d 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -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) diff --git a/R/matrix_conversions.R b/R/matrix_conversions.R index 3f18059..98f6391 100644 --- a/R/matrix_conversions.R +++ b/R/matrix_conversions.R @@ -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) @@ -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) @@ -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, ...) { diff --git a/networkLite.Rproj b/networkLite.Rproj index ce013e1..fab3b4f 100644 --- a/networkLite.Rproj +++ b/networkLite.Rproj @@ -1,4 +1,5 @@ Version: 1.0 +ProjectId: 4584846e-a1cd-4ea7-a3fe-12c82787826e RestoreWorkspace: Default SaveWorkspace: Default