The MAXFEAT function does not work properly with imputation functions such as this:
my_transformation_imputation <-
function(m) {
if (!is.matrix(m))
stop("Cannot transform and impute data - the supplied data is not in matrix form")
if (nrow(m) == 0)
stop("Cannot transform and impute data - data matrix has no rows")
if (ncol(m) == 0)
stop("Cannot transform and impute data - data matrix has no columns")
suppressWarnings({
# suppress warnings here since non-positive values will produce NaN's that will be fixed in the next step
m <- log10(m)
m[is.na(m)] <- NA
})
return ( w4m_filter_zero_imputation(m) )
}