diff --git a/DESCRIPTION b/DESCRIPTION index 26e83e27cca3bc5e145757daf3670eeef8a0817f..fd2c2e5baeca13f93faf5acf57a0e24470b4b12d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: airGRteaching Type: Package Title: Tools to Simplify the Use of the airGR Hydrological Package for Education (Including a Shiny Interface) -Version: 0.1.6.13 +Version: 0.1.6.14 Date: 2017-09-28 Authors@R: c(person("Olivier", "Delaigue", role = c("aut", "cre"), email = "airGR@irstea.fr"), person("Laurent", "Coron", role = c("aut")), person("Pierre", "Brigode", role = c("aut")), person("Guillaume", "Thirel", role = c("ctb"))) Depends: airGR (>= 1.0.9.43) diff --git a/R/Utils.R b/R/Utils.R index c39d213a2d5a02c950a4110a0605c1d97c1bbb08..b7d6c4452d4a18e85e4e3021eace5e111d161e7f 100644 --- a/R/Utils.R +++ b/R/Utils.R @@ -7,6 +7,8 @@ if (getRversion() >= "2.15.1") { utils::globalVariables(c(".ShinyGR.args")) utils::suppressForeignCheck(c(".ShinyGR.args")) + utils::globalVariables(c(".ShinyGR.hist")) + utils::suppressForeignCheck(c(".ShinyGR.hist")) } diff --git a/packrat/init.R b/packrat/init.R deleted file mode 100644 index a768be5fd09a514bc5588da4cdb707c1fe198737..0000000000000000000000000000000000000000 --- a/packrat/init.R +++ /dev/null @@ -1,217 +0,0 @@ -local({ - - ## Helper function to get the path to the library directory for a - ## given packrat project. - getPackratLibDir <- function(projDir = NULL) { - path <- file.path("packrat", "lib", R.version$platform, getRversion()) - - if (!is.null(projDir)) { - - ## Strip trailing slashes if necessary - projDir <- sub("/+$", "", projDir) - - ## Only prepend path if different from current working dir - if (!identical(normalizePath(projDir), normalizePath(getwd()))) - path <- file.path(projDir, path) - } - - path - } - - ## Ensure that we set the packrat library directory relative to the - ## project directory. Normally, this should be the working directory, - ## but we also use '.rs.getProjectDirectory()' if necessary (e.g. we're - ## rebuilding a project while within a separate directory) - libDir <- if (exists(".rs.getProjectDirectory")) - getPackratLibDir(.rs.getProjectDirectory()) - else - getPackratLibDir() - - ## Unload packrat in case it's loaded -- this ensures packrat _must_ be - ## loaded from the private library. Note that `requireNamespace` will - ## succeed if the package is already loaded, regardless of lib.loc! - if ("packrat" %in% loadedNamespaces()) - try(unloadNamespace("packrat"), silent = TRUE) - - if (suppressWarnings(requireNamespace("packrat", quietly = TRUE, lib.loc = libDir))) { - - # Check 'print.banner.on.startup' -- when NA and RStudio, don't print - print.banner <- packrat::get_opts("print.banner.on.startup") - if (print.banner == "auto" && is.na(Sys.getenv("RSTUDIO", unset = NA))) { - print.banner <- TRUE - } else { - print.banner <- FALSE - } - return(packrat::on(print.banner = print.banner)) - } - - ## Escape hatch to allow RStudio to handle bootstrapping. This - ## enables RStudio to provide print output when automagically - ## restoring a project from a bundle on load. - if (!is.na(Sys.getenv("RSTUDIO", unset = NA)) && - is.na(Sys.getenv("RSTUDIO_PACKRAT_BOOTSTRAP", unset = NA))) { - Sys.setenv("RSTUDIO_PACKRAT_BOOTSTRAP" = "1") - setHook("rstudio.sessionInit", function(...) { - # Ensure that, on sourcing 'packrat/init.R', we are - # within the project root directory - if (exists(".rs.getProjectDirectory")) { - owd <- getwd() - setwd(.rs.getProjectDirectory()) - on.exit(setwd(owd), add = TRUE) - } - source("packrat/init.R") - }) - return(invisible(NULL)) - } - - ## Bootstrapping -- only performed in interactive contexts, - ## or when explicitly asked for on the command line - if (interactive() || "--bootstrap-packrat" %in% commandArgs(TRUE)) { - - message("Packrat is not installed in the local library -- ", - "attempting to bootstrap an installation...") - - ## We need utils for the following to succeed -- there are calls to functions - ## in 'restore' that are contained within utils. utils gets loaded at the - ## end of start-up anyhow, so this should be fine - library("utils", character.only = TRUE) - - ## Install packrat into local project library - packratSrcPath <- list.files(full.names = TRUE, - file.path("packrat", "src", "packrat") - ) - - ## No packrat tarballs available locally -- try some other means of installation - if (!length(packratSrcPath)) { - - message("> No source tarball of packrat available locally") - - ## There are no packrat sources available -- try using a version of - ## packrat installed in the user library to bootstrap - if (requireNamespace("packrat", quietly = TRUE) && packageVersion("packrat") >= "0.2.0.99") { - message("> Using user-library packrat (", - packageVersion("packrat"), - ") to bootstrap this project") - } - - ## Couldn't find a user-local packrat -- try finding and using devtools - ## to install - else if (requireNamespace("devtools", quietly = TRUE)) { - message("> Attempting to use devtools::install_github to install ", - "a temporary version of packrat") - library(stats) ## for setNames - devtools::install_github("rstudio/packrat") - } - - ## Try downloading packrat from CRAN if available - else if ("packrat" %in% rownames(available.packages())) { - message("> Installing packrat from CRAN") - install.packages("packrat") - } - - ## Fail -- couldn't find an appropriate means of installing packrat - else { - stop("Could not automatically bootstrap packrat -- try running ", - "\"'install.packages('devtools'); devtools::install_github('rstudio/packrat')\"", - "and restarting R to bootstrap packrat.") - } - - # Restore the project, unload the temporary packrat, and load the private packrat - packrat::restore(prompt = FALSE, restart = TRUE) - - ## This code path only reached if we didn't restart earlier - unloadNamespace("packrat") - requireNamespace("packrat", lib.loc = libDir, quietly = TRUE) - return(packrat::on()) - - } - - ## Multiple packrat tarballs available locally -- try to choose one - ## TODO: read lock file and infer most appropriate from there; low priority because - ## after bootstrapping packrat a restore should do the right thing - if (length(packratSrcPath) > 1) { - warning("Multiple versions of packrat available in the source directory;", - "using packrat source:\n- ", shQuote(packratSrcPath)) - packratSrcPath <- packratSrcPath[[1]] - } - - - lib <- file.path("packrat", "lib", R.version$platform, getRversion()) - if (!file.exists(lib)) { - dir.create(lib, recursive = TRUE) - } - lib <- normalizePath(lib, winslash = "/") - - message("> Installing packrat into project private library:") - message("- ", shQuote(lib)) - - surround <- function(x, with) { - if (!length(x)) return(character()) - paste0(with, x, with) - } - - ## The following is performed because a regular install.packages call can fail - peq <- function(x, y) paste(x, y, sep = " = ") - installArgs <- c( - peq("pkgs", surround(packratSrcPath, with = "'")), - peq("lib", surround(lib, with = "'")), - peq("repos", "NULL"), - peq("type", surround("source", with = "'")) - ) - installCmd <- paste(sep = "", - "utils::install.packages(", - paste(installArgs, collapse = ", "), - ")") - - fullCmd <- paste( - surround(file.path(R.home("bin"), "R"), with = "\""), - "--vanilla", - "--slave", - "-e", - surround(installCmd, with = "\"") - ) - system(fullCmd) - - ## Tag the installed packrat so we know it's managed by packrat - ## TODO: should this be taking information from the lockfile? this is a bit awkward - ## because we're taking an un-annotated packrat source tarball and simply assuming it's now - ## an 'installed from source' version - - ## -- InstallAgent -- ## - installAgent <- 'InstallAgent: packrat 0.4.8-1' - - ## -- InstallSource -- ## - installSource <- 'InstallSource: source' - - packratDescPath <- file.path(lib, "packrat", "DESCRIPTION") - DESCRIPTION <- readLines(packratDescPath) - DESCRIPTION <- c(DESCRIPTION, installAgent, installSource) - cat(DESCRIPTION, file = packratDescPath, sep = "\n") - - # Otherwise, continue on as normal - message("> Attaching packrat") - library("packrat", character.only = TRUE, lib.loc = lib) - - message("> Restoring library") - restore(restart = FALSE) - - # If the environment allows us to restart, do so with a call to restore - restart <- getOption("restart") - if (!is.null(restart)) { - message("> Packrat bootstrap successfully completed. ", - "Restarting R and entering packrat mode...") - return(restart()) - } - - # Callers (source-erers) can define this hidden variable to make sure we don't enter packrat mode - # Primarily useful for testing - if (!exists(".__DONT_ENTER_PACKRAT_MODE__.") && interactive()) { - message("> Packrat bootstrap successfully completed. Entering packrat mode...") - packrat::on() - } - - Sys.unsetenv("RSTUDIO_PACKRAT_BOOTSTRAP") - - } - -}) diff --git a/packrat/packrat.lock b/packrat/packrat.lock deleted file mode 100644 index a81a89f60f1b804929c75e92d32aefc059bc27a2..0000000000000000000000000000000000000000 --- a/packrat/packrat.lock +++ /dev/null @@ -1,112 +0,0 @@ -PackratFormat: 1.4 -PackratVersion: 0.4.8.1 -RVersion: 3.3.3 -Repos: CRAN=https://pbil.univ-lyon1.fr/CRAN/, - CRANextra=http://www.stats.ox.ac.uk/pub/RWin - -Package: R6 -Source: CRAN -Version: 2.2.1 -Hash: 530f0b839551f96ec991ce4f93156ee1 - -Package: Rcpp -Source: CRAN -Version: 0.12.11 -Hash: 2ee22f3b5e75dec80b1d8eca61cd96d8 - -Package: airGR -Source: CRAN -Version: 1.0.5.12 - -Package: digest -Source: CRAN -Version: 0.6.12 -Hash: e53fb8c58673df868183697e39a6a4d6 - -Package: dygraphs -Source: CRAN -Version: 1.1.1.4 -Hash: 6c0c428f37a8923a337e1af157f63839 -Requires: magrittr, htmltools, zoo, htmlwidgets, xts - -Package: htmltools -Source: CRAN -Version: 0.3.6 -Hash: eeba9fb36d4cb6cc66f060187102be41 -Requires: Rcpp, digest - -Package: htmlwidgets -Source: CRAN -Version: 0.8 -Hash: e7a3c80acddc2412f96d616949e40bb8 -Requires: jsonlite, yaml, htmltools - -Package: httpuv -Source: CRAN -Version: 1.3.3 -Hash: 81cab0e82a62025f180863eb4ddeeb20 -Requires: Rcpp - -Package: jsonlite -Source: CRAN -Version: 1.5 -Hash: 9c51936d8dd00b2f1d4fe9d10499694c - -Package: lattice -Source: CRAN -Version: 0.20-35 -Hash: 26b9d7f0d0cb4e1d1bbb97f867c82d89 - -Package: magrittr -Source: CRAN -Version: 1.5 -Hash: bdc4d48c3135e8f3b399536ddf160df4 - -Package: mime -Source: CRAN -Version: 0.5 -Hash: 463550cf44fb6f0a2359368f42eebe62 - -Package: packrat -Source: CRAN -Version: 0.4.8-1 -Hash: 6ad605ba7b4b476d84be6632393f5765 - -Package: plotrix -Source: CRAN -Version: 3.6-5 -Hash: 6e32d6943523c20e336a8af5b48a17f0 - -Package: shiny -Source: CRAN -Version: 1.0.3 -Hash: f133585c72ea31592f663e68c6ff0b3e -Requires: R6, digest, jsonlite, mime, sourcetools, xtable, httpuv, - htmltools - -Package: sourcetools -Source: CRAN -Version: 0.1.6 -Hash: 226d56d7469587da40b0f96180e711b4 - -Package: xtable -Source: CRAN -Version: 1.8-2 -Hash: 7293235cfcc14cdff1ce7fd1a0212031 - -Package: xts -Source: CRAN -Version: 0.9-7 -Hash: fb3f81d7a2fa2323879b6b49722ddc5e -Requires: zoo - -Package: yaml -Source: CRAN -Version: 2.1.14 -Hash: c81230c3a7d9ba20607ad6b4331173d1 - -Package: zoo -Source: CRAN -Version: 1.8-0 -Hash: df9711767f56f086e8a8d1f0fb926ff6 -Requires: lattice diff --git a/packrat/packrat.opts b/packrat/packrat.opts deleted file mode 100644 index 3e876bb9b38fa3d2e763ee47a44c9ad5ae980240..0000000000000000000000000000000000000000 --- a/packrat/packrat.opts +++ /dev/null @@ -1,21 +0,0 @@ -auto.snapshot: TRUE -use.cache: FALSE -print.banner.on.startup: auto -vcs.ignore.lib: TRUE -vcs.ignore.src: FALSE -external.packages: - airGR - xts - dygraphs - shiny - plotrix - markdown -local.repos: -load.external.packages.on.startup: TRUE -ignored.packages: -quiet.package.installation: TRUE -snapshot.recommended.packages: FALSE -snapshot.fields: - Imports - Depends - LinkingTo diff --git a/packrat/src/R6/R6_2.2.1.tar.gz b/packrat/src/R6/R6_2.2.1.tar.gz deleted file mode 100644 index 1778c9936b9b71a24816734882de9b4d82b690dc..0000000000000000000000000000000000000000 Binary files a/packrat/src/R6/R6_2.2.1.tar.gz and /dev/null differ diff --git a/packrat/src/Rcpp/Rcpp_0.12.11.tar.gz b/packrat/src/Rcpp/Rcpp_0.12.11.tar.gz deleted file mode 100644 index 38955b81930906969814dddef616243f219245ed..0000000000000000000000000000000000000000 Binary files a/packrat/src/Rcpp/Rcpp_0.12.11.tar.gz and /dev/null differ diff --git a/packrat/src/airGR/airGR_1.0.5.12.tar.gz b/packrat/src/airGR/airGR_1.0.5.12.tar.gz deleted file mode 100644 index ce275d8ac4f198b480aaef66eb257e536c24a04d..0000000000000000000000000000000000000000 Binary files a/packrat/src/airGR/airGR_1.0.5.12.tar.gz and /dev/null differ diff --git a/packrat/src/digest/digest_0.6.12.tar.gz b/packrat/src/digest/digest_0.6.12.tar.gz deleted file mode 100644 index 376f9540801a06268897d3987abcafeedf8b879c..0000000000000000000000000000000000000000 Binary files a/packrat/src/digest/digest_0.6.12.tar.gz and /dev/null differ diff --git a/packrat/src/htmltools/htmltools_0.3.6.tar.gz b/packrat/src/htmltools/htmltools_0.3.6.tar.gz deleted file mode 100644 index d92d223f0aff87f8101435c529d40ef31a2dfb16..0000000000000000000000000000000000000000 Binary files a/packrat/src/htmltools/htmltools_0.3.6.tar.gz and /dev/null differ diff --git a/packrat/src/htmlwidgets/htmlwidgets_0.8.tar.gz b/packrat/src/htmlwidgets/htmlwidgets_0.8.tar.gz deleted file mode 100644 index 3ae9951a41eecd79627244083e4591fe4d35182e..0000000000000000000000000000000000000000 Binary files a/packrat/src/htmlwidgets/htmlwidgets_0.8.tar.gz and /dev/null differ diff --git a/packrat/src/httpuv/httpuv_1.3.3.tar.gz b/packrat/src/httpuv/httpuv_1.3.3.tar.gz deleted file mode 100644 index 62197448cb89c720442808edc6869393879c8fc7..0000000000000000000000000000000000000000 Binary files a/packrat/src/httpuv/httpuv_1.3.3.tar.gz and /dev/null differ diff --git a/packrat/src/jsonlite/jsonlite_1.5.tar.gz b/packrat/src/jsonlite/jsonlite_1.5.tar.gz deleted file mode 100644 index e159a7e7c07bfffe25d53f6aeabcc7c16226a1e9..0000000000000000000000000000000000000000 Binary files a/packrat/src/jsonlite/jsonlite_1.5.tar.gz and /dev/null differ diff --git a/packrat/src/lattice/lattice_0.20-35.tar.gz b/packrat/src/lattice/lattice_0.20-35.tar.gz deleted file mode 100644 index 9bdc9b9f43fd8506edda9baddff53e156b42fb04..0000000000000000000000000000000000000000 Binary files a/packrat/src/lattice/lattice_0.20-35.tar.gz and /dev/null differ diff --git a/packrat/src/magrittr/magrittr_1.5.tar.gz b/packrat/src/magrittr/magrittr_1.5.tar.gz deleted file mode 100644 index e2f98604095732ac4b684edb612cd6d256dfe865..0000000000000000000000000000000000000000 Binary files a/packrat/src/magrittr/magrittr_1.5.tar.gz and /dev/null differ diff --git a/packrat/src/mime/mime_0.5.tar.gz b/packrat/src/mime/mime_0.5.tar.gz deleted file mode 100644 index 221519bf73130a2f9598d165316065175ab279ce..0000000000000000000000000000000000000000 Binary files a/packrat/src/mime/mime_0.5.tar.gz and /dev/null differ diff --git a/packrat/src/packrat/packrat_0.4.8-1.tar.gz b/packrat/src/packrat/packrat_0.4.8-1.tar.gz deleted file mode 100644 index f16e9360abb6df43f723b919dcafd0c6233146ba..0000000000000000000000000000000000000000 Binary files a/packrat/src/packrat/packrat_0.4.8-1.tar.gz and /dev/null differ diff --git a/packrat/src/sourcetools/sourcetools_0.1.6.tar.gz b/packrat/src/sourcetools/sourcetools_0.1.6.tar.gz deleted file mode 100644 index 7d6e7d488d2828c348a9401f9d502b47f8f2197e..0000000000000000000000000000000000000000 Binary files a/packrat/src/sourcetools/sourcetools_0.1.6.tar.gz and /dev/null differ diff --git a/packrat/src/xtable/xtable_1.8-2.tar.gz b/packrat/src/xtable/xtable_1.8-2.tar.gz deleted file mode 100644 index 7bd762b32ddae588c31bd42d2b1c5764299d8ce0..0000000000000000000000000000000000000000 Binary files a/packrat/src/xtable/xtable_1.8-2.tar.gz and /dev/null differ diff --git a/packrat/src/yaml/yaml_2.1.14.tar.gz b/packrat/src/yaml/yaml_2.1.14.tar.gz deleted file mode 100644 index 1169f6b5c49b641a821e9dbafa7989cc879f5926..0000000000000000000000000000000000000000 Binary files a/packrat/src/yaml/yaml_2.1.14.tar.gz and /dev/null differ diff --git a/packrat/src/zoo/zoo_1.8-0.tar.gz b/packrat/src/zoo/zoo_1.8-0.tar.gz deleted file mode 100644 index c8c943dde6c6950b460b8daec1b9b4e611584123..0000000000000000000000000000000000000000 Binary files a/packrat/src/zoo/zoo_1.8-0.tar.gz and /dev/null differ