R/check_groups.R

Defines functions check_groups

check_groups <- function(files,
                         groups){
    if(is.null(groups)){
        groups <- rep("all",length(files))
    } else {
        if(length(groups)!=length(files)){
            stopper("groups must be the same length as files or NULL.")
        }
    }
    return(stats::setNames(groups,
                           groups))
}
neurogenomics/PeakyFinders documentation built on March 24, 2024, 4:28 p.m.