diff --git a/DESCRIPTION b/DESCRIPTION index 149f8fde0c71553291156d296e057cd56ccc529a..e10541a8aaee81b51b0a27ea1166ca080a5dc217 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 9f45dd97d9f5a89a8d560dbfeef41be3560b8784..39631cefeaaab57140eb80ea06e1a02f3d97dd77 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)