From 52a2ab603e3698744fde3d7ce738c16b65e31198 Mon Sep 17 00:00:00 2001
From: Delaigue Olivier <olivier.delaigue@irstea.priv>
Date: Wed, 3 Apr 2019 13:32:56 +0200
Subject: [PATCH] v1.2.13.12 DOC: minor revision of the param optim vignette

---
 DESCRIPTION                     |  2 +-
 NEWS.rmd                        |  2 +-
 vignettes/V02.1_param_optim.Rmd | 11 ++++++-----
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 3ff15b50..15c27e83 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,7 +1,7 @@
 Package: airGR
 Type: Package
 Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
-Version: 1.2.13.11
+Version: 1.2.13.12
 Date: 2019-04-03
 Authors@R: c(
   person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
diff --git a/NEWS.rmd b/NEWS.rmd
index 1506460c..2dea471e 100644
--- a/NEWS.rmd
+++ b/NEWS.rmd
@@ -13,7 +13,7 @@ output:
 
 
 
-### 1.2.13.11 Release Notes (2019-04-03)
+### 1.2.13.12 Release Notes (2019-04-03)
 
 
 
diff --git a/vignettes/V02.1_param_optim.Rmd b/vignettes/V02.1_param_optim.Rmd
index d750f77e..1531c1c4 100644
--- a/vignettes/V02.1_param_optim.Rmd
+++ b/vignettes/V02.1_param_optim.Rmd
@@ -83,7 +83,8 @@ upperGR4J <- rep(+9.99, times = 4)
 
 We start with a local optimization strategy by using the PORT routines (using the `nlminb()` of the `stats` package) and by setting a starting point in the transformed parameter space:
 ```{r, warning=FALSE, results='hide', eval=FALSE}
-optPORT <- stats::nlminb(start = c(4.1, 3.9, -0.9, -8.7), 
+startGR4J <- c(4.1, 3.9, -0.9, -8.7)
+optPORT <- stats::nlminb(start = startGR4J, 
                          objective = OptimGR4J,
                          lower = lowerGR4J, upper = upperGR4J,
                          control = list(trace = 1))
@@ -108,12 +109,12 @@ We can then extract the best parameter sets and the value of the performance cri
 ```{r, warning=FALSE, results='hide', eval=FALSE}
 parPORT <- t(sapply(listOptPORT, function(x) x$par))
 objPORT <- sapply(listOptPORT, function(x) x$objective)
-parPORT <- data.frame(parPORT, RMSE = objPORT)
+resPORT <- data.frame(parPORT, RMSE = objPORT)
 ```
 
 As can be seen below, the optimum performance criterion values (column *objective*) can differ from the global optimum value in many cases, resulting in various parameter sets.
 ```{r, warning=FALSE}
-summary(parPORT)
+summary(resPORT)
 ```
 
 The existence of several local minima illustrates the importance of defining an appropriate starting point or of using a multi-start strategy or a global optimization strategy.
@@ -155,7 +156,7 @@ optMALS <- Rmalschains::malschains(fn = OptimGR4J,
 As it can be seen in the table below, the four additional optimization strategies tested lead to very close optima.
 
 ```{r, warning=FALSE, echo=FALSE, eval=FALSE}
-parGLOB <- data.frame(Algo = c("airGR", "PORT", "DE", "PSO", "MA-LS"), 
+resGLOB <- data.frame(Algo = c("airGR", "PORT", "DE", "PSO", "MA-LS"), 
                       round(rbind(
                         OutputsCalib$ParamFinalR                          ,
                         airGR::TransfoParam_GR4J(ParamIn = optPORT$par                    , Direction = "TR"),
@@ -165,7 +166,7 @@ parGLOB <- data.frame(Algo = c("airGR", "PORT", "DE", "PSO", "MA-LS"),
                         digits = 3))
 ```
 ```{r, warning=FALSE, echo=FALSE}
-parGLOB
+resGLOB
 ```
 
 <!-- This is an expected result because the response surface for quadratic performance criteria of the **GR4J** model is generally sufficiently well defined in the transformed parameter space to allow using a local optimization strategy instead of a more time consuming global optimization strategy. -->
-- 
GitLab