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

View source: R/omitdiag.R

omitdiagR Documentation

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)

Arguments

d

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

Details

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

Value

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

Author(s)

Karl W Broman, broman@wisc.edu

See Also

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

Examples

data(expr1, expr2)



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

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


kbroman/lineup documentation built on May 10, 2023, 6:02 p.m.