Skip to content

Commit 5355da5

Browse files
committed
Remove obsolete duplicate
1 parent a8cc4ed commit 5355da5

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

R/utils.R

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ assert <- function(x, y) {
1919
}
2020

2121
#' Get URLs and file names of local database files
22-
#'
22+
#'
2323
#' @param db character; database name. Currently only "chembl" is supported.
2424
#' @param version character; version of the database. Either "latest" (default)
2525
#' or a specific version number, e.g. "30".
@@ -432,18 +432,6 @@ parse_mol <- function(string) {
432432
return(list(eh = h, cl = cl, ab = ab, bb = bb))
433433
}
434434

435-
#' Check if an url exists
436-
#'
437-
#' @param url url
438-
#' @return logical; does the url exist?
439-
#' @noRd
440-
url_exists <- function(url) {
441-
res <- try(httr::HEAD(url), silent = TRUE)
442-
if (inherits(res, "try-error")) return(FALSE)
443-
status <- httr::status_code(res)
444-
status >= 200 && status < 400
445-
}
446-
447435
#' Export a Chemical Structure in .mol Format.
448436
#'
449437
#' Some webchem functions return character strings that contain a chemical
@@ -589,7 +577,7 @@ matcher <-
589577
#' Check if an url exists
590578
#'
591579
#' @param url url
592-
#' @noRd
580+
#' @noRd
593581
url_exists <- function(url) {
594582
foo <- function(x) {
595583
res <- try(httr::HEAD(x), silent = TRUE)

0 commit comments

Comments
 (0)