R/is_url.R

Defines functions is_url

Documented in is_url

#' Check if the input is url e.g. http:// or ftp://
#' @param fileName character vector
#' @keywords internal
#' @source \href{https://rdrr.io/cran/seqminer/src/R/seqminer.R}{
#' Borrowed from \code{seqminer} internal function}
#' @returns boolean.
is_url <- function(fileName) {
    if (all(grepl(pattern = "^http://", fileName) |
            grepl(pattern = "^ftp://", fileName) )) {
        return(TRUE)
    }
    return(FALSE)
}
neurogenomics/PeakyFinders documentation built on Oct. 14, 2024, 3:09 p.m.