From 17a44e958ac401a4d232f9af1ca613cb7c0fc3b9 Mon Sep 17 00:00:00 2001 From: James Hollway Date: Thu, 18 Jun 2026 12:28:44 +0200 Subject: [PATCH 01/13] Fixed non-perm lit link --- R/make_generate.R | 5 +++-- man/make_stochastic.Rd | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/R/make_generate.R b/R/make_generate.R index d66af88f5..ce1749230 100644 --- a/R/make_generate.R +++ b/R/make_generate.R @@ -313,7 +313,7 @@ generate_smallworld <- function(n, p = 0.05, directed = FALSE, width = 2) { #' Barabasi, Albert-Laszlo, and Reka Albert. 1999. #' “Emergence of Scaling in Random Networks.” #' _Science_ 286(5439):509–12. -#' \doi{10.1126/science.286.5439.509}. +#' \doi{10.1126/science.286.5439.509} #' @examples #' generate_scalefree(12, 0.25) #' generate_scalefree(12, 1.25) @@ -348,8 +348,9 @@ generate_scalefree <- function(n, p = 1, directed = FALSE) { #' @references #' ## On the forest-fire model #' Leskovec, Jure, Jon Kleinberg, and Christos Faloutsos. 2007. -#' "\href{https://www.cs.cmu.edu/~jure/pubs/powergrowth-tkdd.pdf}{Graph evolution: Densification and shrinking diameters}". +#' "Graph evolution: Densification and shrinking diameters". #' _ACM transactions on Knowledge Discovery from Data_, 1(1): 2-es. +#' \doi{10.1145/1217299.1217301} #' @examples #' generate_fire(10) #' @export diff --git a/man/make_stochastic.Rd b/man/make_stochastic.Rd index 89c7e01c8..e7725f97e 100644 --- a/man/make_stochastic.Rd +++ b/man/make_stochastic.Rd @@ -126,14 +126,15 @@ Watts, Duncan J., and Steven H. Strogatz. 1998. Barabasi, Albert-Laszlo, and Reka Albert. 1999. “Emergence of Scaling in Random Networks.” \emph{Science} 286(5439):509–12. -\doi{10.1126/science.286.5439.509}. +\doi{10.1126/science.286.5439.509} } \subsection{On the forest-fire model}{ Leskovec, Jure, Jon Kleinberg, and Christos Faloutsos. 2007. -"\href{https://www.cs.cmu.edu/~jure/pubs/powergrowth-tkdd.pdf}{Graph evolution: Densification and shrinking diameters}". +"Graph evolution: Densification and shrinking diameters". \emph{ACM transactions on Knowledge Discovery from Data}, 1(1): 2-es. +\doi{10.1145/1217299.1217301} } } \seealso{ From 5727f2449ffae6923a8da5523ef2ed0120d58d35 Mon Sep 17 00:00:00 2001 From: James Hollway Date: Thu, 18 Jun 2026 12:29:02 +0200 Subject: [PATCH 02/13] Fixed README TOC --- DESCRIPTION | 2 +- README.Rmd | 2 +- README.md | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7726e204b..95f769f4c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: manynet Title: Many Ways to Make, Modify, Mark, and Measure Myriad Networks -Version: 2.1.1 +Version: 2.1.2 Description: Many tools for making, modifying, marking, measuring, and motifs and memberships of many different types of networks. All functions operate with matrices, edge lists, and 'igraph', 'network', and 'tidygraph' objects, diff --git a/README.Rmd b/README.Rmd index ed1336432..0cc036d17 100644 --- a/README.Rmd +++ b/README.Rmd @@ -60,11 +60,11 @@ If you have social network data, `{manynet}` probably has the tools to help you - [Inventing network data](#inventing-network-data) - [Manipulating](#manipulating) - [Translating network data](#translating-network-data) + - [Wrangling with dplyr-style verbs](#wrangling-with-dplyr-style-verbs) - [Modifying](#modifying) - [Reformatting](#reformatting) - [Transforming](#transforming) - [Splitting and Joining](#splitting-and-joining) - - [Extracting](#extracting) - [Installation](#installation) - [Stable](#stable) - [Development](#development) diff --git a/README.md b/README.md index 0c6288432..afa439f39 100644 --- a/README.md +++ b/README.md @@ -49,11 +49,12 @@ with it. - [Inventing network data](#inventing-network-data) - [Manipulating](#manipulating) - [Translating network data](#translating-network-data) + - [Wrangling with dplyr-style + verbs](#wrangling-with-dplyr-style-verbs) - [Modifying](#modifying) - [Reformatting](#reformatting) - [Transforming](#transforming) - [Splitting and Joining](#splitting-and-joining) - - [Extracting](#extracting) - [Installation](#installation) - [Stable](#stable) - [Development](#development) From 96c178f95dda0fd26b4d43aa296b15f6c7b951a1 Mon Sep 17 00:00:00 2001 From: James Hollway Date: Thu, 18 Jun 2026 12:32:17 +0200 Subject: [PATCH 03/13] Trimmed package title and description --- DESCRIPTION | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 95f769f4c..886afecaa 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,7 @@ Package: manynet -Title: Many Ways to Make, Modify, Mark, and Measure Myriad Networks +Title: Many Ways to Make, Manipulate, and Modify Myriad Networks Version: 2.1.2 -Description: Many tools for making, modifying, marking, measuring, - and motifs and memberships of many different types of networks. +Description: Many tools for making, manipulating, and modifying many different types of networks. All functions operate with matrices, edge lists, and 'igraph', 'network', and 'tidygraph' objects, on directed, multiplex, multimodal, signed, and other networks. The package includes functions for importing and exporting, creating and generating networks, From 10b8e8f8c4cc3a11b9cb9357c04dff3beb3f2102 Mon Sep 17 00:00:00 2001 From: James Hollway Date: Fri, 19 Jun 2026 15:07:02 +0200 Subject: [PATCH 04/13] Split igraph and tbl_graph bind_changes() dispatching --- NAMESPACE | 1 + R/manip_changes.R | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NAMESPACE b/NAMESPACE index a3dba39f0..dbfacab9a 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -117,6 +117,7 @@ S3method(as_tidygraph,siena) S3method(as_tidygraph,stocnet) S3method(as_tidygraph,tbl_graph) S3method(bind_changes,default) +S3method(bind_changes,igraph) S3method(bind_changes,stocnet) S3method(bind_changes,tbl_graph) S3method(bind_nodes,default) diff --git a/R/manip_changes.R b/R/manip_changes.R index 373b4a823..87ac4cd39 100644 --- a/R/manip_changes.R +++ b/R/manip_changes.R @@ -93,6 +93,11 @@ bind_changes.default <- function(.data, changes, var, ...){ #' @export bind_changes.tbl_graph <- function(.data, changes, var, ...){ + as_tidygraph(bind_changes.igraph(.data, changes, var, ...)) +} + +#' @export +bind_changes.igraph <- function(.data, changes, var, ...){ out <- .data if(length(names(changes)) == 4){ @@ -139,7 +144,7 @@ bind_changes.tbl_graph <- function(.data, changes, var, ...){ } igraph::graph_attr(out)$changes <- changes - as_tidygraph(out) + out } .check_changevars <- function(changes){ From 292f69f398f7e849957068d327f2f802b361a819 Mon Sep 17 00:00:00 2001 From: James Hollway Date: Fri, 19 Jun 2026 15:07:52 +0200 Subject: [PATCH 05/13] Added matrix method for to_correlation() to fix netrics::cluster_hierarchical() --- NAMESPACE | 1 + R/modif_correlation.R | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/NAMESPACE b/NAMESPACE index dbfacab9a..9d86d73b8 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -395,6 +395,7 @@ S3method(to_components,matrix) S3method(to_components,network) S3method(to_components,tbl_graph) S3method(to_correlation,default) +S3method(to_correlation,matrix) S3method(to_correlation,tbl_graph) S3method(to_cosine,default) S3method(to_cosine,matrix) diff --git a/R/modif_correlation.R b/R/modif_correlation.R index e82315188..68ee30b71 100644 --- a/R/modif_correlation.R +++ b/R/modif_correlation.R @@ -31,6 +31,21 @@ to_correlation.default <- function(.data, method = NULL){ as_input(.data, to_correlation, method = method) } +#' @export +to_correlation.matrix <- function(.data, method = NULL){ + if(is.null(method)) method <- ifelse(is_twomode(.data), + "all", + ifelse(is_complex(.data), + "complex", + ifelse(is_directed(.data), + "recip", "diag"))) + switch(method, + all = .corTwomode(.data), + complex = .corComplex(.data), + recip = .corRecip(.data), + diag = .corDiag(.data)) +} + #' @export to_correlation.tbl_graph <- function(.data, method = NULL){ if(missing(.data)) {expect_nodes(); .data <- .G()} # nocov From 7513e64de909343e3834b18980a17f0d7847348d Mon Sep 17 00:00:00 2001 From: James Hollway Date: Fri, 19 Jun 2026 15:19:47 +0200 Subject: [PATCH 06/13] Added explanation about missing functions to the README --- README.Rmd | 7 +++++++ README.md | 8 ++++++++ man/manip_changes.Rd | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.Rmd b/README.Rmd index 0cc036d17..ef089c52d 100644 --- a/README.Rmd +++ b/README.Rmd @@ -54,6 +54,13 @@ as well as one-mode and two-mode, directed and undirected, weighted, unweighted, longitudinal and dynamic networks. If you have social network data, `{manynet}` probably has the tools to help you work with it. +NB: If you are looking for the visualisation functions that used to be +in `{manynet}`, these have been migrated to their own package `{autograph}`. +If you are looking for the network analytic functions that used to be in +`{manynet}`, these have been migrated to their own package `{netrics}`. +If you install and load `{migraph}`, +all these packages will be installed and loaded and you can use all functionality, past and present. + - [Making](#making) - [Importing network data](#importing-network-data) - [Identifying network data](#identifying-network-data) diff --git a/README.md b/README.md index afa439f39..47b5c82ec 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,14 @@ unweighted, and signed, longitudinal and dynamic networks. If you have social network data, `{manynet}` probably has the tools to help you work with it. +NB: If you are looking for the visualisation functions that used to be +in `{manynet}`, these have been migrated to their own package +`{autograph}`. If you are looking for the network analytic functions +that used to be in `{manynet}`, these have been migrated to their own +package `{netrics}`. If you install and load `{migraph}`, all these +packages will be installed and loaded and you can use all functionality, +past and present. + - [Making](#making) - [Importing network data](#importing-network-data) - [Identifying network data](#identifying-network-data) diff --git a/man/manip_changes.Rd b/man/manip_changes.Rd index 7bcdb13a0..1aadb0fce 100644 --- a/man/manip_changes.Rd +++ b/man/manip_changes.Rd @@ -86,7 +86,7 @@ Below are the currently implemented S3 methods for these functions: \if{html}{\out{
}}\preformatted{ data.frame default igraph stocnet tbl_graph apply_changes * * arrange_changes * * * -bind_changes * * * +bind_changes * * * * delete_changes * * * filter_changes * * * gather_changes * * From aab1806a20d3c41635d4ef552ed9ce70e68edea1 Mon Sep 17 00:00:00 2001 From: James Hollway Date: Fri, 19 Jun 2026 15:36:10 +0200 Subject: [PATCH 07/13] Updated expect_nodes() and expect_ties() to work with also stocnet and other objects --- R/reexports_classes.R | 130 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 119 insertions(+), 11 deletions(-) diff --git a/R/reexports_classes.R b/R/reexports_classes.R index bda776052..7cb985e04 100644 --- a/R/reexports_classes.R +++ b/R/reexports_classes.R @@ -28,23 +28,131 @@ NULL #' @rdname expect #' @export expect_nodes <- function(.data) { - if(missing(.data)){ - if (!tidygraph::.graph_context$free() && tidygraph::.graph_context$active() != "nodes") { - snet_abort("This call requires nodes to be active", call. = FALSE) - } - tidygraph::.G() - } else .data + + obj <- expect_igraph(.data, "nodes") + + if (is.null(obj)) + snet_abort( + "This call requires nodes to be active", + call. = FALSE + ) + + obj } #' @rdname expect #' @export expect_ties <- function(.data) { - if(missing(.data)){ - if (!tidygraph::.graph_context$free() && tidygraph::.graph_context$active() != "edges") { - snet_abort("This call requires ties to be active", call. = FALSE) + + obj <- expect_igraph(.data, "edges") + + if (is.null(obj)) + snet_abort( + "This call requires ties to be active", + call. = FALSE + ) + + obj +} + +expect_igraph <- function(.data, context = NULL) { + + if (!missing(.data)) + return(as_igraph(.data)) + + if (!is.null(context)) { + + obj <- active_network(context) + + if (!is.null(obj)) + return(as_igraph(obj)) + } + + tg <- tryCatch( + tidygraph::.G(), + error = function(e) NULL + ) + + if (!is.null(tg)) + return(as_igraph(tg)) + + NULL +} + +.active_context <- new.env(parent = emptyenv()) +.active_context$data <- NULL +.active_context$active <- NULL + +get_active_context <- function() { + list( + data = .active_context$data, + active = .active_context$active + ) +} + +set_active_context <- function(data, active) { + .active_context$data <- data + .active_context$active <- active +} + +clear_active_context <- function() { + .active_context$data <- NULL + .active_context$active <- NULL +} + +active_network <- function(required = NULL) { + + ctx <- get_active_context() + + if (!is.null(ctx$data)) { + + if (!is.null(required) && + !identical(ctx$active, required)) { + snet_abort( + paste0("This call requires ", required, " to be active"), + call. = FALSE + ) } - tidygraph::.G() - } else .data + + return(ctx$data) + } + + tg <- tryCatch({ + + if (!tidygraph::.graph_context$free()) { + + active <- tidygraph::.graph_context$active() + + if (!is.null(required) && + active != required) { + snet_abort( + paste0("This call requires ", required, " to be active"), + call. = FALSE + ) + } + + tidygraph::.G() + } else { + NULL + } + + }, error = function(e) NULL) + + tg +} + +with_active_context <- function(data, active, expr) { + + old <- get_active_context() + + on.exit( + set_active_context(old$data, old$active), + add = TRUE + ) + + set_active_context(data, active) + + eval.parent(substitute(expr)) } # nocov end \ No newline at end of file From bac94b6fb80a6faf53e064f6374d7a215b2f7b55 Mon Sep 17 00:00:00 2001 From: James Hollway Date: Fri, 19 Jun 2026 15:36:53 +0200 Subject: [PATCH 08/13] Using new with_active_context() within stocnet methods for mutate_ and filter_ nodes and ties --- NAMESPACE | 1 + R/manip_nodes.R | 14 +++++++++----- R/manip_ties.R | 19 +++++++++++++++---- man/manip_ties_num.Rd | 2 +- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 9d86d73b8..35c721b7d 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -143,6 +143,7 @@ S3method(filter_nodes,default) S3method(filter_nodes,stocnet) S3method(filter_nodes,tbl_graph) S3method(filter_ties,default) +S3method(filter_ties,stocnet) S3method(filter_ties,tbl_graph) S3method(from_ties,stocnet) S3method(from_ties,tbl_graph) diff --git a/R/manip_nodes.R b/R/manip_nodes.R index 34da566f0..43279d13a 100644 --- a/R/manip_nodes.R +++ b/R/manip_nodes.R @@ -110,7 +110,8 @@ filter_nodes.tbl_graph <- function(.data, ..., .by = NULL){ #' @export filter_nodes.stocnet <- function(.data, ..., .by = NULL){ - if(is.null(.data$nodes) || nrow(.data$nodes) == 0) return(.data) + with_active_context(.data, "nodes", { + if(is.null(.data$nodes) || nrow(.data$nodes) == 0) return(.data) node_df <- dplyr::mutate(.data$nodes, .orig_id = dplyr::row_number()) kept_nodes <- dplyr::filter(node_df, ..., .by = dplyr::all_of(.by)) @@ -134,6 +135,7 @@ filter_nodes.stocnet <- function(.data, ..., .by = NULL){ make_stocnet(nodes = out_nodes, ties = out_ties, changes = out_changes, global = .data$global, info = .data$info) + }) } #' @rdname manip_nodes_num @@ -279,10 +281,12 @@ mutate_nodes.network <- function(.data, ...){ #' @export mutate_nodes.stocnet <- function(.data, ...){ - out <- .data - out$nodes <- out$nodes |> - dplyr::mutate(...) - out + with_active_context(.data, "nodes", { + out <- .data + out$nodes <- out$nodes |> + dplyr::mutate(...) + out + }) } #' @rdname manip_nodes_attr diff --git a/R/manip_ties.R b/R/manip_ties.R index 74cef3389..ff98396d1 100644 --- a/R/manip_ties.R +++ b/R/manip_ties.R @@ -201,6 +201,15 @@ filter_ties.tbl_graph <- function(.data, ...){ tidygraph::activate(nodes) } +#' @export +filter_ties.stocnet <- function(.data, ...){ + with_active_context(.data, "edges", { + out <- .data + out$ties <- out$ties |> dplyr::filter(...) + out + }) +} + # Manipulating ties attributes #### #' Manipulating tie attributes @@ -271,10 +280,12 @@ mutate_ties.tbl_graph <- function(.data, ...){ #' @export mutate_ties.stocnet <- function(.data, ...){ - out <- .data - out$ties <- out$ties |> - dplyr::mutate(...) - out + with_active_context(.data, "edges", { + out <- .data + out$ties <- out$ties |> + dplyr::mutate(...) + out + }) } #' @rdname manip_ties_attr diff --git a/man/manip_ties_num.Rd b/man/manip_ties_num.Rd index 6dcbd9bbf..16337fb2c 100644 --- a/man/manip_ties_num.Rd +++ b/man/manip_ties_num.Rd @@ -56,7 +56,7 @@ Below are the currently implemented S3 methods for these functions: add_ties * * * * bind_ties * * * delete_ties * * * * -filter_ties * * +filter_ties * * * }\if{html}{\out{
}} If a method is not available for a particular class, but a default method is, From 203b85c6fbfc01c6a4c8871d1a1d934b24b11d81 Mon Sep 17 00:00:00 2001 From: James Hollway Date: Fri, 19 Jun 2026 18:06:02 +0200 Subject: [PATCH 09/13] Dropped direct conflicts between manynet and netrics, added breadcrumbs to startup messages --- NAMESPACE | 55 --------- R/manynet-defunct.R | 220 ----------------------------------- R/zzz.R | 10 +- man/defunct.Rd | 275 -------------------------------------------- 4 files changed, 6 insertions(+), 554 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 35c721b7d..e766e8019 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -779,51 +779,11 @@ export(node_heterophily) export(node_hierarchy) export(node_homophily) export(node_hub) -export(node_in_adopter) -export(node_in_automorphic) -export(node_in_betweenness) -export(node_in_brokering) -export(node_in_community) -export(node_in_component) -export(node_in_core) -export(node_in_eigen) -export(node_in_equivalence) -export(node_in_fluid) -export(node_in_greedy) -export(node_in_infomap) -export(node_in_leiden) -export(node_in_louvain) -export(node_in_optimal) -export(node_in_partition) -export(node_in_regular) -export(node_in_roulette) -export(node_in_spinglass) -export(node_in_strong) -export(node_in_structural) -export(node_in_walktrap) -export(node_in_weak) export(node_indegree) export(node_induced) export(node_infomap) export(node_information) -export(node_is_core) -export(node_is_cutpoint) -export(node_is_exposed) -export(node_is_fold) -export(node_is_independent) -export(node_is_infected) -export(node_is_isolate) -export(node_is_latent) -export(node_is_max) -export(node_is_mean) -export(node_is_mentor) -export(node_is_min) export(node_is_mode) -export(node_is_neighbor) -export(node_is_pendant) -export(node_is_random) -export(node_is_recovered) -export(node_is_universal) export(node_kcoreness) export(node_kernighanlin) export(node_leading_eigen) @@ -907,21 +867,6 @@ export(tie_closeness) export(tie_cohesion) export(tie_degree) export(tie_eigenvector) -export(tie_is_bridge) -export(tie_is_cyclical) -export(tie_is_feedback) -export(tie_is_imbalanced) -export(tie_is_loop) -export(tie_is_max) -export(tie_is_min) -export(tie_is_multiple) -export(tie_is_path) -export(tie_is_random) -export(tie_is_reciprocated) -export(tie_is_simmelian) -export(tie_is_transitive) -export(tie_is_triangular) -export(tie_is_triplet) export(tie_is_twomode) export(tie_signs) export(tie_weights) diff --git a/R/manynet-defunct.R b/R/manynet-defunct.R index 673d10bd8..955e39e08 100644 --- a/R/manynet-defunct.R +++ b/R/manynet-defunct.R @@ -304,134 +304,6 @@ node_walktrap <- function(...) fn_moved("node_walktrap", "node_in_walktrap", ver #' @export node_weak_components <- function(...) fn_moved("node_weak_components", "node_in_weak", version = "2.0.0") -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_is_core <- function(...) fn_moved("node_is_core", "node_is_core", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_is_cutpoint <- function(...) fn_moved("node_is_cutpoint", "node_is_cutpoint", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_is_exposed <- function(...) fn_moved("node_is_exposed", "node_is_exposed", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_is_fold <- function(...) fn_moved("node_is_fold", "node_is_fold", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_is_independent <- function(...) fn_moved("node_is_independent", "node_is_independent", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_is_infected <- function(...) fn_moved("node_is_infected", "node_is_infected", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_is_isolate <- function(...) fn_moved("node_is_isolate", "node_is_isolate", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_is_latent <- function(...) fn_moved("node_is_latent", "node_is_latent", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_is_max <- function(...) fn_moved("node_is_max", "node_is_max", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_is_mean <- function(...) fn_moved("node_is_mean", "node_is_mean", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_is_mentor <- function(...) fn_moved("node_is_mentor", "node_is_mentor", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_is_min <- function(...) fn_moved("node_is_min", "node_is_min", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_is_neighbor <- function(...) fn_moved("node_is_neighbor", "node_is_neighbor", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_is_pendant <- function(...) fn_moved("node_is_pendant", "node_is_pendant", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_is_random <- function(...) fn_moved("node_is_random", "node_is_random", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_is_recovered <- function(...) fn_moved("node_is_recovered", "node_is_recovered", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_is_universal <- function(...) fn_moved("node_is_universal", "node_is_universal", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -tie_is_bridge <- function(...) fn_moved("tie_is_bridge", "tie_is_bridge", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -tie_is_cyclical <- function(...) fn_moved("tie_is_cyclical", "tie_is_cyclical", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -tie_is_feedback <- function(...) fn_moved("tie_is_feedback", "tie_is_feedback", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -tie_is_imbalanced <- function(...) fn_moved("tie_is_imbalanced", "tie_is_imbalanced", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -tie_is_loop <- function(...) fn_moved("tie_is_loop", "tie_is_loop", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -tie_is_max <- function(...) fn_moved("tie_is_max", "tie_is_max", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -tie_is_min <- function(...) fn_moved("tie_is_min", "tie_is_min", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -tie_is_multiple <- function(...) fn_moved("tie_is_multiple", "tie_is_multiple", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -tie_is_path <- function(...) fn_moved("tie_is_path", "tie_is_path", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -tie_is_random <- function(...) fn_moved("tie_is_random", "tie_is_random", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -tie_is_reciprocated <- function(...) fn_moved("tie_is_reciprocated", "tie_is_reciprocated", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -tie_is_simmelian <- function(...) fn_moved("tie_is_simmelian", "tie_is_simmelian", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -tie_is_transitive <- function(...) fn_moved("tie_is_transitive", "tie_is_transitive", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -tie_is_triangular <- function(...) fn_moved("tie_is_triangular", "tie_is_triangular", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -tie_is_triplet <- function(...) fn_moved("tie_is_triplet", "tie_is_triplet", version = "2.0.0") - #' @describeIn defunct Deprecated on 2026-03-22. #' @export net_adhesion <- function(...) fn_moved("net_adhesion", "net_by_adhesion", version = "2.0.0") @@ -820,98 +692,6 @@ tie_degree <- function(...) fn_moved("tie_degree", "tie_by_degree", version = "2 #' @export tie_eigenvector <- function(...) fn_moved("tie_eigenvector", "tie_by_eigenvector", version = "2.0.0") -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_adopter <- function(...) fn_moved("node_in_adopter", "node_in_adopter", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_automorphic <- function(...) fn_moved("node_in_automorphic", "node_in_automorphic", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_betweenness <- function(...) fn_moved("node_in_betweenness", "node_in_betweenness", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_brokering <- function(...) fn_moved("node_in_brokering", "node_in_brokering", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_community <- function(...) fn_moved("node_in_community", "node_in_community", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_component <- function(...) fn_moved("node_in_component", "node_in_component", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_core <- function(...) fn_moved("node_in_core", "node_in_core", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_eigen <- function(...) fn_moved("node_in_eigen", "node_in_eigen", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_equivalence <- function(...) fn_moved("node_in_equivalence", "node_in_equivalence", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_fluid <- function(...) fn_moved("node_in_fluid", "node_in_fluid", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_greedy <- function(...) fn_moved("node_in_greedy", "node_in_greedy", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_infomap <- function(...) fn_moved("node_in_infomap", "node_in_infomap", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_leiden <- function(...) fn_moved("node_in_leiden", "node_in_leiden", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_louvain <- function(...) fn_moved("node_in_louvain", "node_in_louvain", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_optimal <- function(...) fn_moved("node_in_optimal", "node_in_optimal", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_partition <- function(...) fn_moved("node_in_partition", "node_in_partition", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_regular <- function(...) fn_moved("node_in_regular", "node_in_regular", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_roulette <- function(...) fn_moved("node_in_roulette", "node_in_roulette", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_spinglass <- function(...) fn_moved("node_in_spinglass", "node_in_spinglass", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_strong <- function(...) fn_moved("node_in_strong", "node_in_strong", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_structural <- function(...) fn_moved("node_in_structural", "node_in_structural", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_walktrap <- function(...) fn_moved("node_in_walktrap", "node_in_walktrap", version = "2.0.0") - -#' @describeIn defunct Deprecated on 2026-03-22. -#' @export -node_in_weak <- function(...) fn_moved("node_in_weak", "node_in_weak", version = "2.0.0") - #' @describeIn defunct Deprecated on 2026-03-22. #' @export net_by_brokerage <- function(...) fn_moved("net_by_brokerage", "net_x_brokerage", version = "2.0.0") diff --git a/R/zzz.R b/R/zzz.R index 633c403a0..27d47637c 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -21,17 +21,19 @@ greet_startup_cli <- function() { tips <- c( - "i" = "There are lots of ways to contribute to {.pkg manynet} at {.url https://github.com/stocnet/manynet/}.", - "i" = "Please share bugs, issues, or feature requests at {.url https://github.com/stocnet/manynet/issues}. It's really helpful!", + "i" = "Contribute to {.pkg manynet} at {.url https://github.com/stocnet/manynet/}.", + "i" = "Don't hesitate to share bugs, issues, or feature requests at {.url https://github.com/stocnet/manynet/issues}.", # "i" = "To suppress package startup messages, use: `suppressPackageStartupMessages(library({.pkg manynet}))`.", # "i" = "Changing the theme of all your graphs is straightforward with `set_manynet_theme()`", "i" = "If too many messages appear in the console, run `options(snet_verbosity = 'quiet')`", "i" = "Explore changes since the last version with {.code news(package = 'manynet')}.", + "i" = "Visualisation functions have been moved to {.pkg autograph}. Install everything with `install.packages('migraph')`.", + "i" = "Analytic functions have been moved to {.pkg netrics}. Install everything with `install.packages('migraph')`.", "i" = "Visit {.url https://stocnet.github.io/manynet/} to learn more.", - "i" = "The 'Function Overview' may suggest options: {.url https://stocnet.github.io/manynet/reference/index.html}.", + "i" = "Discover new functions at: {.url https://stocnet.github.io/manynet/reference/index.html}.", "i" = "Discover {.emph stocnet} R packages at {.url https://github.com/stocnet/}.", # "i" = "Star me at {.url https://github.com/users/follow?target=jhollway}.", - "i" = "You can list all the tutorials available in {.pkg manynet} using {.fn run_tute}, and run them too!" + "i" = "List the tutorials available in {.pkg manynet} using {.fn run_tute}, and run them too!" ) snet_info(sample(tips, 1)) } diff --git a/man/defunct.Rd b/man/defunct.Rd index 66fcfad0e..bdc16fce3 100644 --- a/man/defunct.Rd +++ b/man/defunct.Rd @@ -52,38 +52,6 @@ \alias{node_triad_census} \alias{node_walktrap} \alias{node_weak_components} -\alias{node_is_core} -\alias{node_is_cutpoint} -\alias{node_is_exposed} -\alias{node_is_fold} -\alias{node_is_independent} -\alias{node_is_infected} -\alias{node_is_isolate} -\alias{node_is_latent} -\alias{node_is_max} -\alias{node_is_mean} -\alias{node_is_mentor} -\alias{node_is_min} -\alias{node_is_neighbor} -\alias{node_is_pendant} -\alias{node_is_random} -\alias{node_is_recovered} -\alias{node_is_universal} -\alias{tie_is_bridge} -\alias{tie_is_cyclical} -\alias{tie_is_feedback} -\alias{tie_is_imbalanced} -\alias{tie_is_loop} -\alias{tie_is_max} -\alias{tie_is_min} -\alias{tie_is_multiple} -\alias{tie_is_path} -\alias{tie_is_random} -\alias{tie_is_reciprocated} -\alias{tie_is_simmelian} -\alias{tie_is_transitive} -\alias{tie_is_triangular} -\alias{tie_is_triplet} \alias{net_adhesion} \alias{net_assortativity} \alias{net_balance} @@ -181,29 +149,6 @@ \alias{tie_cohesion} \alias{tie_degree} \alias{tie_eigenvector} -\alias{node_in_adopter} -\alias{node_in_automorphic} -\alias{node_in_betweenness} -\alias{node_in_brokering} -\alias{node_in_community} -\alias{node_in_component} -\alias{node_in_core} -\alias{node_in_eigen} -\alias{node_in_equivalence} -\alias{node_in_fluid} -\alias{node_in_greedy} -\alias{node_in_infomap} -\alias{node_in_leiden} -\alias{node_in_louvain} -\alias{node_in_optimal} -\alias{node_in_partition} -\alias{node_in_regular} -\alias{node_in_roulette} -\alias{node_in_spinglass} -\alias{node_in_strong} -\alias{node_in_structural} -\alias{node_in_walktrap} -\alias{node_in_weak} \alias{net_by_brokerage} \alias{net_by_dyad} \alias{net_by_hazard} @@ -322,70 +267,6 @@ node_walktrap(...) node_weak_components(...) -node_is_core(...) - -node_is_cutpoint(...) - -node_is_exposed(...) - -node_is_fold(...) - -node_is_independent(...) - -node_is_infected(...) - -node_is_isolate(...) - -node_is_latent(...) - -node_is_max(...) - -node_is_mean(...) - -node_is_mentor(...) - -node_is_min(...) - -node_is_neighbor(...) - -node_is_pendant(...) - -node_is_random(...) - -node_is_recovered(...) - -node_is_universal(...) - -tie_is_bridge(...) - -tie_is_cyclical(...) - -tie_is_feedback(...) - -tie_is_imbalanced(...) - -tie_is_loop(...) - -tie_is_max(...) - -tie_is_min(...) - -tie_is_multiple(...) - -tie_is_path(...) - -tie_is_random(...) - -tie_is_reciprocated(...) - -tie_is_simmelian(...) - -tie_is_transitive(...) - -tie_is_triangular(...) - -tie_is_triplet(...) - net_adhesion(...) net_assortativity(...) @@ -580,52 +461,6 @@ tie_degree(...) tie_eigenvector(...) -node_in_adopter(...) - -node_in_automorphic(...) - -node_in_betweenness(...) - -node_in_brokering(...) - -node_in_community(...) - -node_in_component(...) - -node_in_core(...) - -node_in_eigen(...) - -node_in_equivalence(...) - -node_in_fluid(...) - -node_in_greedy(...) - -node_in_infomap(...) - -node_in_leiden(...) - -node_in_louvain(...) - -node_in_optimal(...) - -node_in_partition(...) - -node_in_regular(...) - -node_in_roulette(...) - -node_in_spinglass(...) - -node_in_strong(...) - -node_in_structural(...) - -node_in_walktrap(...) - -node_in_weak(...) - net_by_brokerage(...) net_by_dyad(...) @@ -769,70 +604,6 @@ wherever possible and update your scripts accordingly. \item \code{node_weak_components()}: Deprecated on 2026-03-22. -\item \code{node_is_core()}: Deprecated on 2026-03-22. - -\item \code{node_is_cutpoint()}: Deprecated on 2026-03-22. - -\item \code{node_is_exposed()}: Deprecated on 2026-03-22. - -\item \code{node_is_fold()}: Deprecated on 2026-03-22. - -\item \code{node_is_independent()}: Deprecated on 2026-03-22. - -\item \code{node_is_infected()}: Deprecated on 2026-03-22. - -\item \code{node_is_isolate()}: Deprecated on 2026-03-22. - -\item \code{node_is_latent()}: Deprecated on 2026-03-22. - -\item \code{node_is_max()}: Deprecated on 2026-03-22. - -\item \code{node_is_mean()}: Deprecated on 2026-03-22. - -\item \code{node_is_mentor()}: Deprecated on 2026-03-22. - -\item \code{node_is_min()}: Deprecated on 2026-03-22. - -\item \code{node_is_neighbor()}: Deprecated on 2026-03-22. - -\item \code{node_is_pendant()}: Deprecated on 2026-03-22. - -\item \code{node_is_random()}: Deprecated on 2026-03-22. - -\item \code{node_is_recovered()}: Deprecated on 2026-03-22. - -\item \code{node_is_universal()}: Deprecated on 2026-03-22. - -\item \code{tie_is_bridge()}: Deprecated on 2026-03-22. - -\item \code{tie_is_cyclical()}: Deprecated on 2026-03-22. - -\item \code{tie_is_feedback()}: Deprecated on 2026-03-22. - -\item \code{tie_is_imbalanced()}: Deprecated on 2026-03-22. - -\item \code{tie_is_loop()}: Deprecated on 2026-03-22. - -\item \code{tie_is_max()}: Deprecated on 2026-03-22. - -\item \code{tie_is_min()}: Deprecated on 2026-03-22. - -\item \code{tie_is_multiple()}: Deprecated on 2026-03-22. - -\item \code{tie_is_path()}: Deprecated on 2026-03-22. - -\item \code{tie_is_random()}: Deprecated on 2026-03-22. - -\item \code{tie_is_reciprocated()}: Deprecated on 2026-03-22. - -\item \code{tie_is_simmelian()}: Deprecated on 2026-03-22. - -\item \code{tie_is_transitive()}: Deprecated on 2026-03-22. - -\item \code{tie_is_triangular()}: Deprecated on 2026-03-22. - -\item \code{tie_is_triplet()}: Deprecated on 2026-03-22. - \item \code{net_adhesion()}: Deprecated on 2026-03-22. \item \code{net_assortativity()}: Deprecated on 2026-03-22. @@ -1027,52 +798,6 @@ wherever possible and update your scripts accordingly. \item \code{tie_eigenvector()}: Deprecated on 2026-03-22. -\item \code{node_in_adopter()}: Deprecated on 2026-03-22. - -\item \code{node_in_automorphic()}: Deprecated on 2026-03-22. - -\item \code{node_in_betweenness()}: Deprecated on 2026-03-22. - -\item \code{node_in_brokering()}: Deprecated on 2026-03-22. - -\item \code{node_in_community()}: Deprecated on 2026-03-22. - -\item \code{node_in_component()}: Deprecated on 2026-03-22. - -\item \code{node_in_core()}: Deprecated on 2026-03-22. - -\item \code{node_in_eigen()}: Deprecated on 2026-03-22. - -\item \code{node_in_equivalence()}: Deprecated on 2026-03-22. - -\item \code{node_in_fluid()}: Deprecated on 2026-03-22. - -\item \code{node_in_greedy()}: Deprecated on 2026-03-22. - -\item \code{node_in_infomap()}: Deprecated on 2026-03-22. - -\item \code{node_in_leiden()}: Deprecated on 2026-03-22. - -\item \code{node_in_louvain()}: Deprecated on 2026-03-22. - -\item \code{node_in_optimal()}: Deprecated on 2026-03-22. - -\item \code{node_in_partition()}: Deprecated on 2026-03-22. - -\item \code{node_in_regular()}: Deprecated on 2026-03-22. - -\item \code{node_in_roulette()}: Deprecated on 2026-03-22. - -\item \code{node_in_spinglass()}: Deprecated on 2026-03-22. - -\item \code{node_in_strong()}: Deprecated on 2026-03-22. - -\item \code{node_in_structural()}: Deprecated on 2026-03-22. - -\item \code{node_in_walktrap()}: Deprecated on 2026-03-22. - -\item \code{node_in_weak()}: Deprecated on 2026-03-22. - \item \code{net_by_brokerage()}: Deprecated on 2026-03-22. \item \code{net_by_dyad()}: Deprecated on 2026-03-22. From 2651c99594b68dcd433a700f511404f4c60584bd Mon Sep 17 00:00:00 2001 From: James Hollway Date: Fri, 19 Jun 2026 18:06:40 +0200 Subject: [PATCH 10/13] Added filter_ties.igraph() to avoid longer routing via stocnet --- NAMESPACE | 1 + R/manip_ties.R | 8 ++++++++ man/manip_ties_num.Rd | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/NAMESPACE b/NAMESPACE index e766e8019..ea5984895 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -143,6 +143,7 @@ S3method(filter_nodes,default) S3method(filter_nodes,stocnet) S3method(filter_nodes,tbl_graph) S3method(filter_ties,default) +S3method(filter_ties,igraph) S3method(filter_ties,stocnet) S3method(filter_ties,tbl_graph) S3method(from_ties,stocnet) diff --git a/R/manip_ties.R b/R/manip_ties.R index ff98396d1..e746126ab 100644 --- a/R/manip_ties.R +++ b/R/manip_ties.R @@ -194,6 +194,14 @@ filter_ties.default <- function(.data, ...){ as_input(.data, filter_ties, ...) } +#' @export +filter_ties.igraph <- function(.data, ...){ + as_tidygraph(.data) |> tidygraph::activate(edges) |> + tidygraph::filter(...) |> + tidygraph::activate(nodes) |> + as_igraph() +} + #' @export filter_ties.tbl_graph <- function(.data, ...){ .data |> tidygraph::activate(edges) |> diff --git a/man/manip_ties_num.Rd b/man/manip_ties_num.Rd index 16337fb2c..8f116d258 100644 --- a/man/manip_ties_num.Rd +++ b/man/manip_ties_num.Rd @@ -56,7 +56,7 @@ Below are the currently implemented S3 methods for these functions: add_ties * * * * bind_ties * * * delete_ties * * * * -filter_ties * * * +filter_ties * * * * }\if{html}{\out{}} If a method is not available for a particular class, but a default method is, From a21069b6fb397d501964da906e4701fac6253057 Mon Sep 17 00:00:00 2001 From: James Hollway Date: Fri, 19 Jun 2026 18:33:58 +0200 Subject: [PATCH 11/13] Fixed bug in as_diffusion.igraph() where events had been forgotten --- R/coerce_graph.R | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/R/coerce_graph.R b/R/coerce_graph.R index 878613414..815874214 100644 --- a/R/coerce_graph.R +++ b/R/coerce_graph.R @@ -846,6 +846,13 @@ as_diffusion.mnet <- function(.data, twomode = FALSE, events) { #' @export as_diffusion.igraph <- function(.data, twomode = FALSE, events) { net <- as_tidygraph(.data) + events <- as_changelist(.data) |> + dplyr::filter(var == "diffusion") |> + dplyr::transmute( + t = time, + nodes = node, + event = value + ) event <- NULL sumchanges <- events |> dplyr::group_by(t) |> dplyr::reframe(I_new = sum(event == "I"), From 6a1123ac1aef5e3354c4c12c9dbd37632724628e Mon Sep 17 00:00:00 2001 From: James Hollway Date: Fri, 19 Jun 2026 21:24:03 +0200 Subject: [PATCH 12/13] Followed copilot advice to fix some edge cases --- R/coerce_graph.R | 5 ++++- R/manip_nodes.R | 1 + R/manip_ties.R | 2 ++ R/reexports_classes.R | 12 ++++++++++-- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/R/coerce_graph.R b/R/coerce_graph.R index 815874214..a5771b592 100644 --- a/R/coerce_graph.R +++ b/R/coerce_graph.R @@ -846,7 +846,10 @@ as_diffusion.mnet <- function(.data, twomode = FALSE, events) { #' @export as_diffusion.igraph <- function(.data, twomode = FALSE, events) { net <- as_tidygraph(.data) - events <- as_changelist(.data) |> + if (missing(events)) { + events <- as_changelist(.data) + } + events <- events |> dplyr::filter(var == "diffusion") |> dplyr::transmute( t = time, diff --git a/R/manip_nodes.R b/R/manip_nodes.R index 43279d13a..39266c09c 100644 --- a/R/manip_nodes.R +++ b/R/manip_nodes.R @@ -282,6 +282,7 @@ mutate_nodes.network <- function(.data, ...){ #' @export mutate_nodes.stocnet <- function(.data, ...){ with_active_context(.data, "nodes", { + if (is.null(.data$nodes) || nrow(.data$nodes) == 0) return(.data) out <- .data out$nodes <- out$nodes |> dplyr::mutate(...) diff --git a/R/manip_ties.R b/R/manip_ties.R index e746126ab..b046fd858 100644 --- a/R/manip_ties.R +++ b/R/manip_ties.R @@ -212,6 +212,7 @@ filter_ties.tbl_graph <- function(.data, ...){ #' @export filter_ties.stocnet <- function(.data, ...){ with_active_context(.data, "edges", { + if (is.null(.data$ties) || nrow(.data$ties) == 0) return(.data) out <- .data out$ties <- out$ties |> dplyr::filter(...) out @@ -289,6 +290,7 @@ mutate_ties.tbl_graph <- function(.data, ...){ #' @export mutate_ties.stocnet <- function(.data, ...){ with_active_context(.data, "edges", { + if (is.null(.data$ties) || nrow(.data$ties) == 0) return(.data) out <- .data out$ties <- out$ties |> dplyr::mutate(...) diff --git a/R/reexports_classes.R b/R/reexports_classes.R index 7cb985e04..e751d371c 100644 --- a/R/reexports_classes.R +++ b/R/reexports_classes.R @@ -109,7 +109,11 @@ active_network <- function(required = NULL) { if (!is.null(required) && !identical(ctx$active, required)) { snet_abort( - paste0("This call requires ", required, " to be active"), + paste0( + "This call requires ", + if (identical(required, "edges")) "ties" else required, + " to be active" + ), call. = FALSE ) } @@ -126,7 +130,11 @@ active_network <- function(required = NULL) { if (!is.null(required) && active != required) { snet_abort( - paste0("This call requires ", required, " to be active"), + paste0( + "This call requires ", + if (identical(required, "edges")) "ties" else required, + " to be active" + ), call. = FALSE ) } From 036e87e1f2ed2bf9d7c74b544be7cde651ee0b33 Mon Sep 17 00:00:00 2001 From: James Hollway Date: Fri, 19 Jun 2026 21:34:59 +0200 Subject: [PATCH 13/13] Updated NEWS --- NEWS.md | 30 ++++++++++++++++++++++++++++++ cran-comments.md | 5 +++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index d04bda498..63d6f4fce 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,33 @@ +# manynet 2.1.2 + +## Package + +- Updated title/description text +- Updated README + - Updated TOC to include new wrangling section + - Added package migration note to README +- Updated startup messages with migration notesand links to `{autograph}`, `{netrics}`, and `{migraph}` +- Removed a set of defunct wrappers for moved/retired functions + +## Making + +- Fixed reference formatting of DOI and citation text + +## Coercion + +- Improved `expect_nodes()`/`expect_ties()` and introduces internal active-context helpers +- Fixed `as_diffusion.igraph()` to derive diffusion events from changelists + +## Manipulating + +- Added `filter_ties.igraph()` and `filter_ties.stocnet()` +- Improved active context inference across `mutate_nodes.stocnet()`, `mutate_ties.stocnet()`, `filter_nodes.stocnet()`, and `filter_ties.stocnet()` +- Added `bind_changes.igraph()` and delegated 'tbl_graph' method to it + +## Modifying + +- Added `to_correlation.matrix()` S3 method + # manynet 2.1.1 ## Package diff --git a/cran-comments.md b/cran-comments.md index 0f731db3e..062b48694 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,6 +1,6 @@ ## Test environments -* local R installation, aarch64-apple-darwin20, R 4.5.2 +* local R installation, aarch64-apple-darwin23, R 4.6.0 * macOS 15.7.7 (on Github), R 4.6.0 * Microsoft Windows Server 2025 10.0.26100 (on Github), R 4.6.0 * Ubuntu 24.04.4 (on Github), R 4.6.0 @@ -9,4 +9,5 @@ 0 errors | 0 warnings | 0 notes -- Fixed README link issue \ No newline at end of file +- Fixed README link issue +- Together with parallel submissions of 'netrics' and 'migraph', should pass all reverse dependency checks now too \ No newline at end of file