-
-
Notifications
You must be signed in to change notification settings - Fork 205
chore!: Hard-deprecate as_adjacency_matrix(edges = )
#1080
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -317,7 +317,7 @@ get.adjacency.sparse <- function(graph, type = c("both", "upper", "lower"), | |
| #' numeric. If the `sparse` argument is `FALSE`, then character is | ||
| #' also allowed. The reason for the difference is that the `Matrix` | ||
| #' package does not support character sparse matrices yet. | ||
| #' @param edges Logical scalar, whether to return the edge ids in the matrix. | ||
| #' @param edges `r lifecycle::badge("deprecated")` Logical scalar, whether to return the edge ids in the matrix. | ||
| #' For non-existant edges zero is returned. | ||
| #' @param names Logical constant, whether to assign row and column names | ||
| #' to the matrix. These are only assigned if the `name` vertex attribute | ||
|
|
@@ -344,14 +344,14 @@ as_adjacency_matrix <- function(graph, type = c("both", "upper", "lower"), | |
| sparse = igraph_opt("sparsematrices")) { | ||
| ensure_igraph(graph) | ||
|
|
||
| if (!missing(edges)) { | ||
| warning("The `edges` argument of `as_adjacency_matrix` is deprecated; it will be removed in igraph 1.4.0") | ||
| if (!missing(edges) && isTRUE(edges)) { | ||
| lifecycle::deprecate_stop("2.0.0", "as_adjacency_matrix(edges = )") | ||
| } | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a |
||
|
|
||
| if (!sparse) { | ||
| get.adjacency.dense(graph, type = type, attr = attr, weights = NULL, names = names) | ||
| } else { | ||
| if (sparse) { | ||
|
maelle marked this conversation as resolved.
|
||
| get.adjacency.sparse(graph, type = type, attr = attr, edges = edges, names = names) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Passing |
||
| } else { | ||
| get.adjacency.dense(graph, type = type, attr = attr, weights = NULL, names = names) | ||
| } | ||
| } | ||
|
|
||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just mention that this must be omitted?