Isolate NA-neighbours
This functions extracts all replicate-values where at least one of the replicates is NA
.
Then, the non-NA
values are sorted by the number of NA
s which occored in this group of replicates.
A list with all NA
-neighbours organized by the number of NA
s gets returned.
isolNAneighb(mat, gr, maxHi = 3, iniCheck = TRUE, callFrom = NULL)
mat |
(matrix or data.frame) main data (may contain |
gr |
(character or factor) grouping of columns of 'mat', replicate association |
maxHi |
(integer) maximum count of NAs to consider separately (higher ones will be counted/pooled as maxHi) |
iniCheck |
(logical) check at beginning if executing this function is useful (presence any |
callFrom |
(character) allow easier tracking of message(s) produced |
list with NA-neighbours sorted by number of NAs in replicate group
this function gets used by matrixNAneighbourImpute
and testRobustToNAimputation
; estimation of mode stableMode
; detection of NAs na.fail
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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.