-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatic version check and startup messages Other minor documentation changes
- Loading branch information
Showing
5 changed files
with
39 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
Package: downscaleR | ||
Depends: | ||
downscaleR.java, | ||
utils, | ||
RCurl, | ||
rJava, | ||
abind, | ||
fields, | ||
R(>= 3.0.0) | ||
Type: Package | ||
Title: R package for climate data analysis and downscaling | ||
Version: 0.0-0 | ||
Date: 11-Jul-2014 | ||
Version: 0.1-0 | ||
Date: 15-Jul-2014 | ||
Author: Santander Meteorology Group <http://www.meteo.unican.es> | ||
Maintainer: Joaquin Bedia <[email protected]> | ||
BugReports: https://github.com/SantanderMetGroup/downscaleR/issues | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#' @importFrom utils packageDescription | ||
#' @importFrom RCurl getURL | ||
|
||
.onAttach <- function(...) { | ||
pkgname <- "downscaleR" | ||
lib <- system.file(package = pkgname) | ||
ver <- packageDescription(pkgname)$Version | ||
builddate <- packageDescription(pkgname)$Date | ||
mess <- paste(pkgname, " version ", ver, " (", builddate,") is loaded", sep = "") | ||
packageStartupMessage(mess) | ||
url <- "https://raw.githubusercontent.com/SantanderMetGroup/downscaleR/stable/DESCRIPTION" | ||
a <- getURL(url) | ||
b <- readLines(textConnection(a)) | ||
latest.ver <- package_version(gsub("Version: ", "", b[grep("Version", b)])) | ||
if (ver < latest.ver) { | ||
ver.mess1 <- paste("WARNING: Your current version of ", pkgname, " (v", ver, ") is not up-to-date", sep = "") | ||
ver.mess <- paste("Get the latest stable version (", latest.ver, ") using <devtools::install_github('SantanderMetGroup/downscaleR@stable'>)", sep = "") | ||
ver.mess | ||
packageStartupMessage(ver.mess1) | ||
packageStartupMessage(ver.mess) | ||
} | ||
} | ||
# End | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters