Skip to content

Commit

Permalink
Made get.inducedSubgraph() generic.
Browse files Browse the repository at this point in the history
references #86
  • Loading branch information
krivit committed Apr 1, 2024
1 parent 5fb95d2 commit 62cebb1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Suggests:
Description: Tools to create and modify network objects. The network class can represent a range of relational data types, and supports arbitrary vertex/edge/graph attributes.
License: GPL (>=2)
URL: https://statnet.org/
RoxygenNote: 7.2.0
RoxygenNote: 7.3.1
Roxygen: list(markdown = TRUE)
Collate:
'access.R'
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ S3method(get.edge.attribute,list)
S3method(get.edge.attribute,network)
S3method(get.edge.value,list)
S3method(get.edge.value,network)
S3method(get.inducedSubgraph,network)
S3method(get.network.attribute,network)
S3method(get.vertex.attribute,network)
S3method(is.bipartite,mixingmatrix)
Expand Down
8 changes: 7 additions & 1 deletion R/access.R
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,13 @@ get.dyads.eids<-function(x,tails,heads,neighborhood = c("out", "in", "combined")
#'
#'
#' @export get.inducedSubgraph
get.inducedSubgraph<-function(x, v, alters=NULL, eid=NULL){
get.inducedSubgraph <- function(x, ...) {
UseMethod("get.inducedSubgraph")
}

#' @rdname get.inducedSubgraph
#' @export
get.inducedSubgraph.network <- function(x, v, alters=NULL, eid=NULL){
#Check to be sure we were called with a network
if(!is.network(x))
stop("get.inducedSubgraph requires an argument of class network.")
Expand Down
5 changes: 4 additions & 1 deletion man/get.inducedSubgraph.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 62cebb1

Please sign in to comment.