Learn R Programming

lineup (version 0.44)

pulldiag: Pull out the diagonal from a distance matrix

Description

Pull out the diagonal from a distance matrix calculated by distee() (that is, self-self distances).

Usage

pulldiag(d)

Value

A vector with the self-self distances.

Arguments

d

A distance matrix calculated by distee().

Author

Karl W Broman, broman@wisc.edu

Details

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

See Also

omitdiag(), 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)

# pull out the self-self distances
d_selfself <- pulldiag(d)

# samples with smallest self-self correlation
sort(d_selfself)[1:10]

Run the code above in your browser using DataLab