Learn R Programming

netmeta (version 3.2-0)

netdistance.default: 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

# S3 method for default
netdistance(x, ...)

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

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

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

# S3 method for 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.

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

Run this code
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)

# \donttest{
data(Senn2013)

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

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

Run the code above in your browser using DataLab