R/util.R

Defines functions id lunion lintersect

#' @noRd
lintersect <- function(lst) {
        res <- lst[[1]]
        if (length(lst) > 1) {
                for (i in 2:length(lst)) {
                        res <- intersect(res, lst[[i]])
                }
        }
        res
}

#' @noRd
lunion <- function(lst) {
        res <- lst[[1]]
        if (length(lst) > 1) {
                for (i in 2:length(lst)) {
                        res <- union(res, lst[[i]])
                }
        }
        res
}


#' @noRd
id <- function(x) {
	x
}

Try the coreheat package in your browser

Any scripts or data that you put into this service are public.

coreheat documentation built on Sept. 19, 2021, 9:07 a.m.