R/hub_accessor_factory.R

Defines functions hub_accessor_factory

#' @keywords internal
#'
#' @importFrom ExperimentHub ExperimentHub
hub_accessor_factory <- function(ehid) {
    force(ehid)

    function(metadata = FALSE) {
        eh <- ExperimentHub()

        if (metadata) {
            eh[ehid]
        } else {
            eh[[ehid]]
        }
    }
}
waldronlab/HMP16SData documentation built on Oct. 26, 2023, 5:42 a.m.