a <- matrix(rnorm(200), nrow=20)
b <- matrix(rnorm(200), nrow=20)
aa <- mat2adj(a, method="cor", n.cores=1)
bb <- mat2adj(b, method="cor", n.cores=1)
dd <- netdist(aa,bb, d="HIM", n.cores=1)
print(dd)
## Use a different gamma parameter for HIM distance
dd <- netdist(aa,bb, d="HIM", ga=0.5, n.cores=1)
print(dd)
## The function can accept also list of adjacency matrices as input
alist <- list(aa,bb)
ddist <- netdist(alist, d="HIM", n.cores=1)
## Use of multiple cores
## Not run:
# dd <- netdist(aa,bb,n.cores=4)
# ## End(Not run)
Run the code above in your browser using DataLab