Learn R Programming

MDSMap (version 1.1)

dmap.check: Reorders a distance map by a new marker order.

Description

Reorders a distance map by a new marker order.

Usage

dmap.check(distmap, newrank)

Arguments

distmap

A symmetric matrix of pairwise inter-marker distances.

newrank

A vector of scalars giving the new rank of each marker, markers should appear in the same order as in the distmap.

Value

Matrix of pairwise inter-marker distances.

Details

The rows and columns in distmap are reordered such that if entry i in newrank has value j then row j and column j in the new matrix are row i and column i from distmap.

Examples

Run this code
# NOT RUN {
s<-matrix(1:25,nrow=5)
s<-0.5*(s+t(s))
rank<-c(1,3,4,2,5)
dmap.check(s,rank)
# }

Run the code above in your browser using DataLab