From 32e526752140fc61e3f5dc21c27c69c1ab07c88d Mon Sep 17 00:00:00 2001 From: Dorchies David <david.dorchies@irstea.fr> Date: Mon, 10 Aug 2020 15:24:08 +0200 Subject: [PATCH] bug: Change in SGL URL Refs #1 --- DESCRIPTION | 2 +- R/sgl.R | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 149f8fd..e10541a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: SGLdataGrabber Title: Grab available data from EPTB Seine Grands Lacs web site -Version: 0.1.0 +Version: 0.1.1 Authors@R: person(given = "David", family = "Dorchies", diff --git a/R/sgl.R b/R/sgl.R index 9f45dd9..39631ce 100644 --- a/R/sgl.R +++ b/R/sgl.R @@ -11,7 +11,7 @@ #' @importFrom textutils HTMLdecode #' #' @examples -#' SGL_GrabVariableListLake("https://seinegrandslacs.fr/fr/quatre-lacs-reservoirs/lac-reservoir-seine") +#' SGL_GrabVariableListLake("https://seinegrandslacs.fr/quatre-lacs-reservoirs/lac-reservoir-seine") #' SGL_GrabVariableListLake <- function(URL) { r <- httr::GET(URL) @@ -32,7 +32,7 @@ SGL_GrabVariableListLake <- function(URL) { #' SGL_GrabVariableListAll() #' SGL_GrabVariableListAll <- function( - URL = "https://seinegrandslacs.fr/fr/quatre-lacs-reservoirs/lac-reservoir-", + URL = "https://seinegrandslacs.fr/quatre-lacs-reservoirs/lac-reservoir-", lakes = c("marne", "seine", "aube", "de-panneciere") ) { do.call(rbind, lapply(paste0(URL, lakes), SGL_GrabVariableListLake)) @@ -50,7 +50,7 @@ SGL_GrabVariableListAll <- function( #' #' @examples #' varlist <- SGL_GrabVariableListLake( -#' "https://seinegrandslacs.fr/fr/quatre-lacs-reservoirs/lac-reservoir-seine" +#' "https://seinegrandslacs.fr/quatre-lacs-reservoirs/lac-reservoir-seine" #' ) #' SGL_GrabVariable(varlist$link[1]) #' @@ -82,7 +82,7 @@ SGL_GrabVariable <- function(URL) { #' SGL_GrabAllVariables() #' SGL_GrabAllVariables <- function( - URL = "https://seinegrandslacs.fr/fr/quatre-lacs-reservoirs/lac-reservoir-", + URL = "https://seinegrandslacs.fr/quatre-lacs-reservoirs/lac-reservoir-", lakes = c("marne", "seine", "aube", "de-panneciere") ) { lV <- SGL_GrabVariableListAll(URL, lakes) -- GitLab