Learn R Programming

lineup (version 0.44)

omitdiag: Replace the diagonal in a distance matrix with missing values

Description

Replace the diagonal (that is, self-self distances) from a distance matrix calculated by distee() or disteg() with missing values (so that only self-nonself distances are left).

Usage

omitdiag(d)

Value

A matrix of the same form as the input, but with self-self distances replaced with NA.

Arguments

d

A distance matrix calculated by distee() or disteg().

Author

Karl W Broman, broman@wisc.edu

Details

We use the row and column names to identify which entries are self-self.

See Also

pulldiag(), distee(), disteg(), summary.lineupdist(), plot2dist(), plot.lineupdist()

Examples

Run this code
data(expr1, expr2)

expr1 <- expr1[,1:500]
expr2 <- expr2[,1:500]

# distance as RMS difference
d <- distee(expr1, expr2)

# focus on the self-nonself distances
# (replace self-self distances with NA)
d_selfnonself <- omitdiag(d)

Run the code above in your browser using DataLab