Learn R Programming

scanstatistics (version 1.0.1)

reorder_rows: Reorder rows by priority.

Description

Reorder each row in the input matrix A by the column indices found in the corresponding row of the matrix priority_indices.

Usage

reorder_rows(A, priority_indices)

Arguments

A

A matrix, containing e.g. counts or baselines. Rows represent time (ordered from most recent to most distant), columns represent e.g. locations or data streams (numbered from 1 and up).

priority_indices

An integer matrix as output by prioritize_cols.

Value

An integer matrix of the same dimension as A.