License License GPL 2 GPL 2

The airGRteaching Shiny GUI launched by the 'ShinyGR' function is sometimes unstable on latest versions of RStudio
It is better to launch the GUI from the Rgui or from R into a terminal

1 What is the airGRteaching package?

1.1 Presentation

airGRteaching logo

airGRteaching is an add-on package to the airGR package. It simplifies its use and is more specifically oriented towards teaching than airGR. It provides access to the GR rainfall-runoff models (GR4H, GR5H, GR4J, GR5J, GR6J, GR2M, GR1A) and a snow melt and accumulation model (CemaNeige) with limited programming skills. This package also provides a graphical interface to help students exploring data and model results.

The airGRteaching package has been designed to fulfil a major requirement: facilitating the use of the airGR functionalities by students. The names of the functions and their arguments were chosen to this end.

1.2 Main features of airGRteaching

The package is mostly based on three new families of functions:

  • the functions that allow to complete very simply a hydrological modelling exercise
  • plotting functions to help students to explore observed data and to interpret the results of calibration and simulation of the GR models
  • a function which runs a ‘Shiny’ graphical interface that allows for displaying in real-time model parameters impacts on hydrographs

2 Installation

You can install the package with the following command:


If you use RStudio, you can use the Packages interface :

All the dependencie will ba automatically download and installed with airGRteaching:

  • airGR
  • dygraphs
  • markdown
  • plotrix
  • shiny
  • shinyjs
  • xts

You cannot run airGRteaching without airGR. You cannot perform dynamic graphics to visualize your inputs or your results time-series whithout the xts and the dygraphs packages, but you can produce static charts. All the other packages are needed to run the Shiny GUI.

You can download the airGRteaching source, Windows binaries or macOS binaries on the CRAN.


airGRteaching now depends on R >= 3.6.0.

Problems were observed in the use of dynamic graphics and in the use of the graphical interface of the airGRteaching package. These problemes were due to the use of the htmlwidgets by the dygraphs package.

The latest version of htmlwidgets (>= 1.5.3) is fixed and is now available on the CRAN. You don’t have to install it from GitHub anymore.

You can check the installed version of the htmlwidgets (>= 1.5.3) package by the following command:

[1] '1.5.3'

If you have a too old version, please install a new time the package from the CRAN.


3 Misc

3.1 How to cite the package

To cite the airGRteaching package in your scientific document, please use the references returned by the citation() function:


To cite airGRteaching in publications use these two references:

  Delaigue, O., Thirel, G., Coron, L. and Brigode, P. (2018). airGR and airGRteaching: Two
  open-source tools for rainfall-runoff modeling and teaching hydrology. HIC 2018. 13th
  International Conference on Hydroinformatics. EPiC Series in Engineering (eds. G.L. Loggia, G.
  Freni, V. Puleo & M.D. Marchis), 3, 541-548, EasyChair, doi: 10.29007/qsqj.

  Delaigue, O., Coron, L. and Brigode, P. (2021). airGRteaching: Teaching Hydrological Modelling
  with GR (Shiny Interface Included). R package version 0.2.12, doi: 10.15454/W0SSKT, URL:

To see these entries in BibTeX format, use 'print(<citation>, bibtex=TRUE)', 'toBibtex(.)', or set

To retrieve a “.bib” format for LaTeX documents, you can use the following command:

  author = {O. Delaigue and G. Thirel and L. Coron and P. Brigode},
  title = {{airGR} and {airGRteaching}: Two Open-Source Tools for Rainfall-Runoff Modeling and Teaching Hydrology},
  booktitle = {HIC 2018. 13th International Conference on Hydroinformatics},
  editor = {Goffredo {La Loggia} and Gabriele Freni and Valeria Puleo and Mauro {De Marchis}},
  series = {EPiC Series in Engineering},
  volume = {3},
  pages = {541-548},
  year = {2018},
  publisher = {EasyChair},
  bibsource = {EasyChair,},
  issn = {2516-2330},
  url = {},
  doi = {10.29007/qsqj},

  title = {{airGRteaching}: Teaching Hydrological Modelling with {GR} ({Shiny} Interface Included)},
  author = {O. Delaigue and L. Coron and P. Brigode},
  journal = {R News},
  year = {2021},
  note = {R package version 0.2.12},
  url = {},
  doi = {10.15454/W0SSKT},

3.2 Known places where airGRteaching is used