R/motif_count.R

Defines functions motif_count

Documented in motif_count

#' Motif count
#' @description Count the motifs in a competitive network
#' @name motif_count
#' @param network igraph object
#' @return a vector of seven motifs

motif_count <- function(network) {
  tt <- triad_census(network)[c(10, 9, 12, 14, 13, 15, 16)]
  return(tt)
}
Chang-Yu-Chang/MigrationCommunity documentation built on Aug. 13, 2019, 9:41 p.m.