Commit fd9a77c6 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v0.2.9.20 refactor(htmlwidgets): dyplot and ShinyGR now return a message to...

v0.2.9.20 refactor(htmlwidgets): dyplot and ShinyGR now return a message to warning about the version of htmlwidgets updated
Refs #5
parent 45e6ccb2
Package: airGRteaching
Type: Package
Title: Teaching Hydrological Modelling with the GR Rainfall-Runoff Models ('Shiny' Interface Included)
Version: 0.2.9.18
Date: 2020-03-27
Version: 0.2.9.20
Date: 2020-10-19
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")),
......
......@@ -4,16 +4,23 @@
### 0.2.9.18 Release Notes (2020-03-27)
### 0.2.9.19 Release Notes (2020-10-16)
#### New features
- in the <code>ShinyGR()</code> interface, there is a new tab panel that shows a summary sheets of basin if the name of the dataset contains the code station (8 characters : 1 letter and 7 numbers) of the Banque Hydro French database (so it is available only for the dataset of this database)
- in the <code>ShinyGR()</code> interface, there is a new tab panel that shows a summary sheets of basin if the name of the dataset contains the code station (8 characters : 1 letter and 7 numbers) of the Banque Hydro French database (so it is available only for the dataset of this database)
#### User-visible changes
- the <code>theme</code> agument of the <code>ShinyGR()<.code> function now works even if the user used the wrong character case
- the <code>theme</code> agument of the <code>ShinyGR()</code> function now works even if a wrong character case
#### CRAN-compatibility updates
- when the package is loaded, a message warns the users if they use a version of 'htmlwidgets' < 1.5.2.9000. The latest version of this package, available on GitHub, avoids troubles with the use of dynamic graphics of the 'dygraphs' package (called by the <code>dyplot&#42;()</code> and the <code>ShinyGR()</code> functions)
____________________________________________________________________________________
......
ShinyGR <- function(ObsDF = NULL, DatesR = NULL, Precip = NULL, PotEvap = NULL, Qobs = NULL, TempMean = NULL,
ZInputs = NULL, HypsoData = NULL, NLayers = 5, SimPer, NamesObsBV = NULL,
theme = "RStudio") {
.onAttach()
if ((is.null(ObsDF) | any(sapply(ObsDF, is.null))) && (is.null(DatesR) | is.null(Precip) | is.null(PotEvap) | is.null(Qobs))) {
stop("Missing input data")
}
......
.onAttach <- function(libname, pkgname) {
if (packageVersion("htmlwidgets") <= "1.5.1") {
if (packageVersion("htmlwidgets") <= "1.5.2") {
base::packageStartupMessage("\n---------------------------\n")
base::packageStartupMessage("This version of 'airGRteaching' is designed to work with 'htmlwidgets' >= 1.5.1.9000 (troubles with 'dygraphs')")
base::packageStartupMessage("This version of 'airGRteaching' is designed to work with 'htmlwidgets' >= 1.5.2.9000 (troubles with 'dygraphs')")
base::packageStartupMessage("Install the latest version of 'htmlwidgets' from GitHub with the following command lines:")
base::packageStartupMessage("\tinstall.packages(\"remotes\")\n\tremotes::install_github(\"ramnathv/htmlwidgets\")")
base::packageStartupMessage("\n---------------------------\n")
......
dyplot <- function(x, ...) {
.onAttach()
UseMethod("dyplot")
}
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