Commit 44cc1b11 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v0.2.9.0 NEW: add .CheckUrl function in order to to test if a remote url exists #10

parent b43a09e1
Package: airGRteaching
Type: Package
Title: Teaching Hydrological Modelling with the GR Rainfall-Runoff Models ('Shiny' Interface Included)
Version: 0.2.8.69
Date: 2020-02-28
Version: 0.2.9.0
Date: 2020-03-24
Authors@R: c(
person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@inrae.fr"),
person("Laurent", "Coron", role = c("aut"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -36,6 +36,7 @@ exportPattern(".DiagramGR")
exportPattern(".TypeModelGR")
exportPattern(".StartStop")
exportPattern(".DyShadingMulti")
exportPattern(".CheckUrl")
......
......@@ -4,6 +4,11 @@
### 0.2.9.0 Release Notes (2020-03-24)
____________________________________________________________________________________
### 0.2.8.69 Release Notes (2020-02-28)
......
......@@ -25,6 +25,20 @@ if (getRversion() >= "2.15.1") {
## =================================================================================
## function to test if a remote url exists
## =================================================================================
.CheckUrl <- function(url, timeout = 2) {
con <- url(description = url)
check <- suppressWarnings(try(open.connection(con = con, open = "rt", timeout = t), silent = TRUE)[1])
suppressWarnings(try(close.connection(con), silent = TRUE))
is.null(check)
}
## =================================================================================
## function to compute the start and stop id of equal values in a vector
## =================================================================================
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment