R/as_delayed_array.R

Defines functions as_delayed_array

as_delayed_array <- function(exp,
                             as_DelayedArray = TRUE,
                             verbose = TRUE) {
    
    if (as_DelayedArray && (!is_delayed_array(exp))) {
        messager("Converting to DelayedArray.", v = verbose)
        requireNamespace("DelayedArray")
        if (!is_matrix(exp)) {
            exp <- as.matrix(exp)
        }
        exp <- DelayedArray::DelayedArray(exp)
    }
    return(exp)
}
neurogenomics/orthogene documentation built on Jan. 30, 2024, 4:44 a.m.