isolNAneighb {wrProteo} | R Documentation |
Isolate NA-neighbours
Description
This functions extracts all replicate-values where at least one of the replicates is NA
and sorts by number of NA
s per group.
A list with all NA
-neighbours organized by the number of NA
s gets returned.
Usage
isolNAneighb(mat, gr, silent = FALSE, debug = FALSE, callFrom = NULL)
Arguments
mat |
(matrix or data.frame) main data (may contain |
gr |
(character or factor) grouping of columns of 'mat', replicate association |
silent |
(logical) suppress messages |
debug |
(logical) display additional messages for debugging |
callFrom |
(character) allow easier tracking of messages produced |
Value
This function returns a list with NA-neighbours sorted by number of NAs in replicate group
See Also
This function gets used by matrixNAneighbourImpute
and testRobustToNAimputation
; estimation of mode stableMode
; detection of NAs na.fail
Examples
mat1 <- c(22.2, 22.5, 22.2, 22.2, 21.5, 22.0, 22.1, 21.7, 21.5, 22, 22.2, 22.7,
NA, NA, NA, NA, NA, NA, NA, 21.2, NA, NA, NA, NA,
NA, 22.6, 23.2, 23.2, 22.4, 22.8, 22.8, NA, 23.3, 23.2, NA, 23.7,
NA, 23.0, 23.1, 23.0, 23.2, 23.2, NA, 23.3, NA, NA, 23.3, 23.8)
mat1 <- matrix(mat1, ncol=12, byrow=TRUE)
gr4 <- gl(3, 4)
isolNAneighb(mat1, gr4)
[Package wrProteo version 1.12.0 Index]