Skip to content

Commit

Permalink
Removed NetworkToolbox dependency again due to circular dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
SachaEpskamp committed Jul 15, 2018
1 parent 64ab4bc commit 6288b93
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Expand Up @@ -13,7 +13,7 @@ Authors@R: c(
Maintainer: Sacha Epskamp <mail@sachaepskamp.com>
Depends: R (>= 3.0.0)
Suggests: RSVGTipsDevice, sendplot
Imports: methods, grDevices, psych, ellipse, lavaan, sem, plyr, Hmisc, igraph, jpeg, png, colorspace, Matrix, sna, corpcor, reshape2, ggplot2, glasso, huge, fdrtool, d3Network, ggm, gtools, BDgraph, parallel, pbapply, abind, NetworkToolbox
Imports: methods, grDevices, psych, ellipse, lavaan, sem, plyr, Hmisc, igraph, jpeg, png, colorspace, Matrix, sna, corpcor, reshape2, ggplot2, glasso, huge, fdrtool, d3Network, ggm, gtools, BDgraph, parallel, pbapply, abind
ByteCompile: yes
Description: Weighted network visualization and analysis, as well as Gaussian graphical model computation. See Epskamp et al. (2012) <doi:10.18637/jss.v048.i04>.
URL: http://sachaepskamp.com/qgraph
Expand Down
10 changes: 5 additions & 5 deletions R/centrality.R
Expand Up @@ -75,11 +75,11 @@ centrality <- function(graph,alpha=1,posfun=abs,pkg = c("igraph","qgraph"),all.s
InExpectedInfluence <- colSums(W)
OutExpectedInfluence <- rowSums(W)

# Randomized Shortest Paths Betweenness Centrality
rspbc <- NetworkToolbox::rspbc(abs(W))

# Hybrid Centrality
hybrid <- NetworkToolbox::hybrid(abs(W), BC = "random")
# # Randomized Shortest Paths Betweenness Centrality
# rspbc <- NetworkToolbox::rspbc(abs(W))
#
# # Hybrid Centrality
# hybrid <- NetworkToolbox::hybrid(abs(W), BC = "random")

DistMat <- 1/(ifelse(posfun(W)==0,0,posfun(W)^alpha))
if (pkg=="igraph"){
Expand Down
2 changes: 2 additions & 0 deletions man/centrality.Rd
Expand Up @@ -44,6 +44,8 @@ A list containing:
\item{InDegree}{A vector containing the inward degree of each node.}
\item{Closeness}{A vector containing the closeness of each node.}
\item{Betweenness}{A vector containing the betweenness of each node}
%\item{rspbc}{Randomized Shortest Paths Betweenness Centrality as implemented in \code{\link[NetworkToolbox]}{rspbc}
%\item{hybrid}{Hybrid centrality as implemented in \code{\link[NetworkToolbox]}{hybrid}
\item{InExpectedInfluence}{Expected incoming influence - sum of incomming edge weights connected to a node (not made absolute)}
\item{OutExpectedInfluence}{Expected outgoing influence - sum of outgoing edge weights connected to a node (not made absolute)}
\item{ShortestPathLengths }{A matrix containing the shortest path lengths of each pairs of nodes. These path lenghts are based on the inverse of the absolute edge weights raised to the power alpha.}
Expand Down

0 comments on commit 6288b93

Please sign in to comment.