Learn R Programming

resemble (version 1.2.2)

isubset: iterator that re-organize and subset a matrix based on dissimilarity matrix (used in mbl)

Description

internal

Usage

isubset(x, Dx = NULL, D, k, by = "column")

Arguments

x
an input matrix
Dx
a (symmetric) cross-dissimilarity matrix of x
D
a distance matrix between x and another matrix
k
matrix number of neighbours (rows) to keep
by
'column' or 'row'

Value

an object of class iterator giving a list with (a) a subset of the input matrix with rows re-arranged in the order of the distance vector, (b) the distance vector, (c) the order of the distance vector

Details

isubset will look at the order of knn in each col of D and re-organize the rows of x accordingly