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 2, 2024
1 parent 5f28b1f commit 5037d4c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
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 5037d4c

Please sign in to comment.