netdistance: Calculate distance matrix for an adjacency matrix

View source: R/netdistance.R

netdistance.defaultR Documentation

Calculate distance matrix for an adjacency matrix

Description

Calculate distance matrix for an adjacency matrix based on distance algorithm by Müller et al. (1987).

Usage

## Default S3 method:
netdistance(x, ...)

## S3 method for class 'netmeta'
netdistance(x, sort = gs("sort.distance"), ...)

## S3 method for class 'netcomb'
netdistance(x, sort = gs("sort.distance"), ...)

## S3 method for class 'netconnection'
netdistance(x, ...)

## S3 method for class 'netdistance'
print(x, lab.Inf = ".", ...)

netdistance(x, ...)

Arguments

x

Either a netmeta or netcomb object or an adjacency matrix.

...

Additional arguments.

sort

A logical indicating whether to sort within (sub)networks by treatment names.

lab.Inf

A character string to label infinite values.

Author(s)

Gerta Rücker gerta.ruecker@uniklinik-freiburg.de Guido Schwarzer guido.schwarzer@uniklinik-freiburg.de

References

Müller WR, Szymanski K, Knop JV, and Trinajstic N (1987): An algorithm for construction of the molecular distance matrix. Journal of Computational Chemistry, 8, 170–73

See Also

netmeta, netconnection

Examples

data(smokingcessation)

pw1 <- pairwise(list(treat1, treat2, treat3),
  event = list(event1, event2, event3), n = list(n1, n2, n3),
  data = smokingcessation, sm = "OR")
net1 <- netmeta(pw1, common = FALSE)

netdistance(net1)


data(Senn2013)

net1 <- netmeta(TE, seTE, treat1, treat2, studlab,
  data = Senn2013, sm = "MD")

netdistance(net1)
netdistance(net1$A.matrix)



netmeta documentation built on April 3, 2025, 6:12 p.m.