1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
#============================================================================
# common functions
igVcount <- function(x, ...) UseMethod("igVcount")
#' @export
igVcount.igraph <- function(x, ...)
igraph::vcount(x)
#' @export
igVcount.network <- function(x, ...)
network::network.size(x)
igEcount <- function(x, ...) UseMethod("igEcount")
#' @export
igEcount.igraph <- function(x, ...)
igraph::ecount(x)
#' @export
igEcount.network <- function(x, ...)
network::network.edgecount(x)
igDirected <- function(x) UseMethod("igDirected")
#' @export
igDirected.igraph <- function(x) {
igraph::is_directed(x)
}
#' @export
igDirected.network <- function(x) {
network::is.directed(x)
}
|