R/AllUtility.R

Defines functions .test .active_value `.active<-` .active .elementset .set .element

.element <- function(x) x@element

.set <- function(x) x@set

.elementset <- function(x) x@elementset

.active <- function(x) x@active

`.active<-` <- function(x, value)
{
    value <- gsub('"', '', value)
    stopifnot(value %in% c("element", "set", "elementset"))
    x@active <- value
    x
}

#' @importFrom methods slot
.active_value <-
    function(x)
{
    slot(x, .active(x))
}

.test <-
    function(x)
{
    all(lengths(x) == 1L) &&
        length(unique(sapply(x, typeof))) == 1L
}
Bioconductor/BiocSet documentation built on Oct. 31, 2024, 11:43 p.m.