#' Provide top three hub node and assocaited hub value from a give graph object.
#'
#' This funtion provides a table contaning various network attributes
#' @param graph.object is a graph object that is used for plotting in an igraph
#' @keywords igraph, summary, graph, top3hub
#' @export
#' @examples
#' g <- erdos.renyi.game(100, 1/1000)
#' top3<- top3Hub(g)
top3Hub<-function(graph.object){
aa<-authority.score(graph.object)$vector
bb<-V(graph.object)
dd<-list(bb,round(aa,3))
df <- data.frame(matrix(unlist(dd), nrow=length(V(graph.object)), byrow=F))
ordf<-df[with(df, order(-df[,2])), ]
Hub<-ordf[1:3,1]
grabHub<-paste(Hub,collapse=";")
HUbV<-ordf[1:3,2]
grabHubV<-paste(HUbV,collapse=";")
grab<-c(grabHub,grabHubV)
return(grab)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.