getPairsFromDistForIndices: Identifies the pairs that match the argument indices 'k' in...

View source: R/selection_funks.R

getPairsFromDistForIndicesR Documentation

Identifies the pairs that match the argument indices k in the argument dist.obj. E.g. you might want to know which pairs have maximum distance: getPairsFromDistForIndices(which(x.dist == max(x.dist)), x.dist) will help you out. Code taken from this post: https://stackoverflow.com/questions/39005958/r-how-to-get-row-column-subscripts-of-matched-elements-from-a-distance-matri

Description

Identifies the pairs that match the argument indices k in the argument dist.obj. E.g. you might want to know which pairs have maximum distance: getPairsFromDistForIndices(which(x.dist == max(x.dist)), x.dist) will help you out. Code taken from this post: https://stackoverflow.com/questions/39005958/r-how-to-get-row-column-subscripts-of-matched-elements-from-a-distance-matri

Usage

getPairsFromDistForIndices(k, dist.obj)

Arguments

k

an integer vector holding the indices for which to identify the pairs.

dist.obj

An instance of base::dist that holds the distances and labels from which to extract the pairs.

Value

An instance of base::matrix with two columns in which each row holds a pair. Cells can be NA if the argument indices were not valid.


asishallab/GeneFamilies documentation built on May 22, 2023, 11:30 a.m.