Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

coordOfFilt

get coordinates of values/points in matrix according to filtering condition


Description

Get coordinates of values/points in matrix according to filtering condition

Usage

coordOfFilt(mat, cond, sortByRows = FALSE, silent = FALSE, callFrom = NULL)

Arguments

mat

(matrix or data.frame) matrix or data.frame

cond

(logical or integer) condition/test to see which values of mat fulfull test, or integer of index passing

sortByRows

(logical) optional sorting of results by row-index

silent

(logical) suppress messages

callFrom

(character) allow easier tracking of message(s) produced

Value

matrix columns 'row' and 'col'

See Also

Examples

set.seed(2021); ma1 <- matrix(sample.int(n=40,size=27,replace=TRUE), ncol=9)
## let's test which values are >37
which(ma1 >37)      # doesn't tell which row & col
coordOfFilt(ma1, ma1 >37)

wrMisc

Analyze Experimental High-Throughput (Omics) Data

v1.5.4
GPL-3
Authors
Wolfgang Raffelsberger [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.