Skip to content

Commit

Permalink
Made permute.vertexIDs() generic.
Browse files Browse the repository at this point in the history
  • Loading branch information
krivit committed Nov 18, 2024
1 parent f6ba333 commit ddda8d6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ S3method(network.dyadcount,network)
S3method(network.edgecount,network)
S3method(network.naedgecount,network)
S3method(network.size,network)
S3method(permute.vertexIDs,network)
S3method(plot,network)
S3method(plot.network,default)
S3method(print,mixingmatrix)
Expand Down
7 changes: 6 additions & 1 deletion R/access.R
Original file line number Diff line number Diff line change
Expand Up @@ -1795,6 +1795,7 @@ network.vertex.names<-function(x){
#' @param x an object of class \code{\link{network}}.
#' @param vids a vector of vertex IDs, in the order to which they are to be
#' permuted.
#' @param ... additional arguments to methods.
#' @return Invisibly, a pointer to the permuted network.
#' \code{permute.vertexIDs} modifies its argument in place.
#' @author Carter T. Butts \email{buttsc@@uci.edu}
Expand All @@ -1812,7 +1813,11 @@ network.vertex.names<-function(x){
#' all(flo[n:1,n:1]==as.sociomatrix(nflo)) #Should be TRUE
#'
#' @export permute.vertexIDs
permute.vertexIDs<-function(x,vids){
permute.vertexIDs <- function(x, vids, ...) UseMethod("permute.vertexIDs")

#' @rdname permute.vertexIDs
#' @export
permute.vertexIDs.network <- function(x, vids, ...) {
#First, check to see that this is a graph object
if(!is.network(x))
stop("permute.vertexIDs requires an argument of class network.\n")
Expand Down
7 changes: 6 additions & 1 deletion man/permute.vertexIDs.Rd

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

0 comments on commit ddda8d6

Please sign in to comment.