diff --git a/R/adjacency.R b/R/adjacency.R index 5022bf8821b..192f7d47f67 100644 --- a/R/adjacency.R +++ b/R/adjacency.R @@ -405,8 +405,8 @@ graph_from_adjacency_matrix <- function(adjmatrix, mode <- igraph.match.arg(mode) if (!is.matrix(adjmatrix) && !inherits(adjmatrix, "Matrix")) { - lifecycle::deprecate_soft( - "1.6.0", + lifecycle::deprecate_warn( + "2.0.0", "graph_from_adjacency_matrix(adjmatrix = 'must be a matrix')" ) adjmatrix <- as.matrix(1) @@ -414,8 +414,8 @@ graph_from_adjacency_matrix <- function(adjmatrix, if (mode == "undirected") { if (!is_symmetric(adjmatrix)) { - lifecycle::deprecate_soft( - "1.6.0", + lifecycle::deprecate_warn( + "2.0.0", "graph_from_adjacency_matrix(adjmatrix = 'must be symmetric with mode = \"undirected\"')", details = 'Use mode = "max" to achieve the original behavior.' ) diff --git a/R/as_phylo.R b/R/as_phylo.R index c33615d8db4..0c2f0522622 100644 --- a/R/as_phylo.R +++ b/R/as_phylo.R @@ -10,8 +10,8 @@ #' @inheritParams ape::as.phylo #' @keywords internal as_phylo <- function(x, ...) { - lifecycle::deprecate_soft( - "1.5.0", + lifecycle::deprecate_warn( + "2.0.0", "ape::as.phylo()" ) check_installed("ape", "for using `as.phylo()`") diff --git a/R/assortativity.R b/R/assortativity.R index 2c106362332..35dd0198b69 100644 --- a/R/assortativity.R +++ b/R/assortativity.R @@ -148,8 +148,8 @@ assortativity <- function(graph, types1 = NULL, types2 = NULL) { if (...length() > 0) { - lifecycle::deprecate_soft( - "1.6.0", + lifecycle::deprecate_warn( + "2.0.0", "assortativity(... =)", details = "Arguments `values` and `values.in` must be named." ) @@ -170,8 +170,8 @@ assortativity <- function(graph, } if (missing(values)) { - lifecycle::deprecate_soft( - "1.6.0", + lifecycle::deprecate_warn( + "2.0.0", "assortativity(types1 =)", "assortativity(values =)" ) @@ -179,8 +179,8 @@ assortativity <- function(graph, } if (!is.null(types2)) { - lifecycle::deprecate_soft( - "1.6.0", + lifecycle::deprecate_warn( + "2.0.0", "assortativity(types2 =)", "assortativity(values.in =)" ) diff --git a/R/centrality.R b/R/centrality.R index accd2452ac4..f4845d4895c 100644 --- a/R/centrality.R +++ b/R/centrality.R @@ -196,8 +196,8 @@ alpha.centrality <- function(graph, nodes = V(graph), alpha = 1, loops = FALSE, #' @keywords internal #' @export estimate_betweenness <- function(graph, vids = V(graph), directed = TRUE, cutoff, weights = NULL) { - lifecycle::deprecate_soft( - "1.6.0", + lifecycle::deprecate_warn( + "2.0.0", "estimate_betweenness()", "betweenness()", details = "with the cutoff argument." @@ -352,8 +352,8 @@ edge_betweenness <- function(graph, e = E(graph), #' @export estimate_edge_betweenness <- function(graph, e = E(graph), directed = TRUE, cutoff, weights = NULL) { - lifecycle::deprecate_soft( - "1.6.0", + lifecycle::deprecate_warn( + "2.0.0", "estimate_edge_betweenness()", "edge_betweenness()", details = "with the cutoff argument." @@ -468,8 +468,8 @@ closeness <- function(graph, vids = V(graph), #' @export estimate_closeness <- function(graph, vids = V(graph), mode = c("out", "in", "all", "total"), cutoff, weights = NULL, normalized = FALSE) { - lifecycle::deprecate_soft( - "1.6.0", + lifecycle::deprecate_warn( + "2.0.0", "estimate_closeness()", "closeness()", details = "with the cutoff argument." @@ -683,8 +683,8 @@ arpack <- function(func, extra = NULL, sym = FALSE, options = arpack_defaults(), env = parent.frame(), complex = !sym) { if (is.function(options)) { - lifecycle::deprecate_soft( - "1.6.0", + lifecycle::deprecate_warn( + "2.0.0", "arpack(options = 'must be a list')", details = c("`arpack_defaults()` is now a function, use `options = arpack_defaults()` instead of `options = arpack_defaults`.") ) @@ -870,8 +870,8 @@ subgraph_centrality <- function(graph, diag = FALSE) { #' @export spectrum <- function(graph, algorithm=c("arpack", "auto", "lapack", "comp_auto", "comp_lapack", "comp_arpack"), which=list(), options=arpack_defaults()) { if (is.function(options)) { - lifecycle::deprecate_soft( - "1.6.0", + lifecycle::deprecate_warn( + "2.0.0", "spectrum(options = 'must be a list')", details = c("`arpack_defaults()` is now a function, use `options = arpack_defaults()` instead of `options = arpack_defaults`.") ) @@ -983,8 +983,8 @@ eigen_centrality <- function(graph, options = arpack_defaults()) { if (is.function(options)) { - lifecycle::deprecate_soft( - "1.6.0", + lifecycle::deprecate_warn( + "2.0.0", "eigen_centrality(options = 'must be a list')", details = c("`arpack_defaults()` is now a function, use `options = arpack_defaults()` instead of `options = arpack_defaults`.") ) @@ -1135,8 +1135,8 @@ diversity <- diversity_impl hub_score <- function(graph, scale=TRUE, weights=NULL, options=arpack_defaults()) { if (is.function(options)) { - lifecycle::deprecate_soft( - "1.6.0", + lifecycle::deprecate_warn( + "2.0.0", "hub_score(options = 'must be a list')", details = c("`arpack_defaults()` is now a function, use `options = arpack_defaults()` instead of `options = arpack_defaults`.") ) @@ -1155,8 +1155,8 @@ hub_score <- function(graph, scale=TRUE, weights=NULL, options=arpack_defaults() #' @export authority_score <- function(graph, scale=TRUE, weights=NULL, options=arpack_defaults()) { if (is.function(options)) { - lifecycle::deprecate_soft( - "1.6.0", + lifecycle::deprecate_warn( + "2.0.0", I("arpack_defaults"), "arpack_defaults()", details = c("So the function arpack_defaults(), not an object called arpack_defaults.") diff --git a/R/community.R b/R/community.R index 5f9a5d90d0f..8067b91f805 100644 --- a/R/community.R +++ b/R/community.R @@ -1868,8 +1868,8 @@ cluster_leading_eigen <- function(graph, steps = -1, weights = NULL, env = parent.frame()) { if (is.function(options)) { - lifecycle::deprecate_soft( - "1.6.0", + lifecycle::deprecate_warn( + "2.0.0", "cluster_leading_eigen(options = 'must be a list')", details = c("`arpack_defaults()` is now a function, use `options = arpack_defaults()` instead of `options = arpack_defaults`.") ) @@ -1986,8 +1986,8 @@ cluster_label_prop <- function( initial = NULL, fixed = NULL) { if (...length() > 0) { - lifecycle::deprecate_soft( - "1.6.0", + lifecycle::deprecate_warn( + "2.0.0", "cluster_label_prop(... = )", details = "Arguments `initial` and `fixed` must be named." ) diff --git a/R/conversion.R b/R/conversion.R index 1e9495e5efe..65fff40cb63 100644 --- a/R/conversion.R +++ b/R/conversion.R @@ -1002,7 +1002,7 @@ as_biadjacency_matrix <- function(graph, types = NULL, attr = NULL, #' this naming to avoid confusion with the edge-vertex incidence matrix. #' @export as_incidence_matrix <- function(...) { # nocov start - lifecycle::deprecate_soft("1.6.0", "as_incidence_matrix()", "as_biadjacency_matrix()") + lifecycle::deprecate_warn("2.0.0", "as_incidence_matrix()", "as_biadjacency_matrix()") as_biadjacency_matrix(...) } # nocov end #' @rdname graph_from_data_frame diff --git a/R/incidence.R b/R/incidence.R index 0cc7716b932..c177c033cb4 100644 --- a/R/incidence.R +++ b/R/incidence.R @@ -277,7 +277,7 @@ graph_from_biadjacency_matrix <- function(incidence, directed = FALSE, #' this naming to avoid confusion with the edge-vertex incidence matrix. #' @export from_incidence_matrix <- function(...) { # nocov start - lifecycle::deprecate_soft("1.6.0", "graph_from_incidence_matrix()", "graph_from_biadjacency_matrix()") + lifecycle::deprecate_warn("2.0.0", "graph_from_incidence_matrix()", "graph_from_biadjacency_matrix()") graph_from_biadjacency_matrix(...) } # nocov end #' From incidence matrix @@ -295,6 +295,6 @@ from_incidence_matrix <- function(...) { # nocov start #' this naming to avoid confusion with the edge-vertex incidence matrix. #' @export graph_from_incidence_matrix <- function(...) { # nocov start - lifecycle::deprecate_soft("1.6.0", "graph_from_incidence_matrix()", "graph_from_biadjacency_matrix()") + lifecycle::deprecate_warn("2.0.0", "graph_from_incidence_matrix()", "graph_from_biadjacency_matrix()") graph_from_biadjacency_matrix(...) } # nocov end diff --git a/R/layout.R b/R/layout.R index f8a737e82b4..44eeb373e16 100644 --- a/R/layout.R +++ b/R/layout.R @@ -1687,8 +1687,8 @@ layout_with_mds <- function(graph, dist = NULL, dim = 2, options = arpack_defaults()) { if (is.function(options)) { - lifecycle::deprecate_soft( - "1.6.0", + lifecycle::deprecate_warn( + "2.0.0", "layout_with_mds(options = 'must be a list')", details = c("`arpack_defaults()` is now a function, use `options = arpack_defaults()` instead of `options = arpack_defaults`.") ) diff --git a/tests/testthat/_snaps/graph.adjacency.md b/tests/testthat/_snaps/graph.adjacency.md index c46c4146288..399b4e7aa31 100644 --- a/tests/testthat/_snaps/graph.adjacency.md +++ b/tests/testthat/_snaps/graph.adjacency.md @@ -21,7 +21,7 @@ graph_from_adjacency_matrix(m, mode = "undirected") Condition Warning: - The `adjmatrix` argument of `graph_from_adjacency_matrix()` must be symmetric with mode = "undirected" as of igraph 1.6.0. + The `adjmatrix` argument of `graph_from_adjacency_matrix()` must be symmetric with mode = "undirected" as of igraph 2.0.0. i Use mode = "max" to achieve the original behavior. Output IGRAPH U--- 2 2 -- @@ -53,7 +53,7 @@ graph_from_adjacency_matrix(m2, mode = "undirected") Condition Warning: - The `adjmatrix` argument of `graph_from_adjacency_matrix()` must be symmetric with mode = "undirected" as of igraph 1.6.0. + The `adjmatrix` argument of `graph_from_adjacency_matrix()` must be symmetric with mode = "undirected" as of igraph 2.0.0. i Use mode = "max" to achieve the original behavior. Output IGRAPH U--- 2 0 -- @@ -62,7 +62,7 @@ graph_from_adjacency_matrix(1) Condition Warning: - The `adjmatrix` argument of `graph_from_adjacency_matrix()` must be a matrix as of igraph 1.6.0. + The `adjmatrix` argument of `graph_from_adjacency_matrix()` must be a matrix as of igraph 2.0.0. Output IGRAPH D--- 1 1 -- + edge: @@ -71,7 +71,7 @@ graph_from_adjacency_matrix(1, mode = "undirected") Condition Warning: - The `adjmatrix` argument of `graph_from_adjacency_matrix()` must be a matrix as of igraph 1.6.0. + The `adjmatrix` argument of `graph_from_adjacency_matrix()` must be a matrix as of igraph 2.0.0. Output IGRAPH U--- 1 1 -- + edge: @@ -101,7 +101,7 @@ graph_from_adjacency_matrix(m, mode = "undirected") Condition Warning: - The `adjmatrix` argument of `graph_from_adjacency_matrix()` must be symmetric with mode = "undirected" as of igraph 1.6.0. + The `adjmatrix` argument of `graph_from_adjacency_matrix()` must be symmetric with mode = "undirected" as of igraph 2.0.0. i Use mode = "max" to achieve the original behavior. Output IGRAPH U--- 2 2 -- @@ -133,7 +133,7 @@ graph_from_adjacency_matrix(m2, mode = "undirected") Condition Warning: - The `adjmatrix` argument of `graph_from_adjacency_matrix()` must be symmetric with mode = "undirected" as of igraph 1.6.0. + The `adjmatrix` argument of `graph_from_adjacency_matrix()` must be symmetric with mode = "undirected" as of igraph 2.0.0. i Use mode = "max" to achieve the original behavior. Output IGRAPH U--- 2 0 --