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 March 24, 2024, 4:28 p.m.