From 9b7d3c7c04fc43097ee8fc25880367dd9c9945ec Mon Sep 17 00:00:00 2001 From: Kristine Karstens Date: Fri, 26 Apr 2024 11:05:51 +0200 Subject: [PATCH] add madrat.R --- .buildlibrary | 2 +- .pre-commit-config.yaml | 4 ++-- CITATION.cff | 4 ++-- DESCRIPTION | 4 ++-- R/madrat.R | 12 ++++++++++++ README.md | 6 +++--- 6 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 R/madrat.R diff --git a/.buildlibrary b/.buildlibrary index 4b15e04..dbfc5ea 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '198370' +ValidationKey: '2162470839' AutocreateReadme: yes AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 243f46a..62f13da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ exclude: '^tests/testthat/_snaps/.*$' repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0 hooks: - id: check-case-conflict - id: check-json @@ -15,7 +15,7 @@ repos: - id: mixed-line-ending - repo: https://github.com/lorenzwalthert/precommit - rev: v0.4.0 + rev: 7910e0323d7213f34275a7a562b9ef0fde8ce1b9 # frozen: v0.4.2 hooks: - id: parsable-R - id: deps-in-desc diff --git a/CITATION.cff b/CITATION.cff index a73ed3d..bdf0236 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -2,8 +2,8 @@ cff-version: 1.2.0 message: If you use this software, please cite it using the metadata from this file. type: software title: 'mrlandcore: One-line description of this awesome package' -version: 0.1.0 -date-released: '2024-04-24' +version: 0.1.0.9001 +date-released: '2024-04-26' abstract: One-paragraph description of this awesome package. authors: - family-names: Beier diff --git a/DESCRIPTION b/DESCRIPTION index a39444c..8c2cb66 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: mrlandcore Title: One-line description of this awesome package -Version: 0.1.0 -Date: 2024-04-24 +Version: 0.1.0.9001 +Date: 2024-04-26 Authors@R: c(person("Felicitas", "Beier", email = "beier@pik-potsdam.de", role = c("aut","cre")), person("Kristine", "Karstens", role = "aut"), diff --git a/R/madrat.R b/R/madrat.R new file mode 100644 index 0000000..3c8b9aa --- /dev/null +++ b/R/madrat.R @@ -0,0 +1,12 @@ + +.onAttach <- function(libname, pkgname) { + madrat::madratAttach(pkgname) +} + +.onDetach <- function(libpath) { + madrat::madratDetach(libpath) +} + +# redirect cat to message to have messages +# properly logged +cat <- function(...) message(...) diff --git a/README.md b/README.md index fcfedb9..721f966 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # One-line description of this awesome package -R package **mrlandcore**, version **0.1.0** +R package **mrlandcore**, version **0.1.0.9001** [![CRAN status](https://www.r-pkg.org/badges/version/mrlandcore)](https://cran.r-project.org/package=mrlandcore) [![R build status](https://github.com/pik-piam/mrlandcore/workflows/check/badge.svg)](https://github.com/pik-piam/mrlandcore/actions) [![codecov](https://codecov.io/gh/pik-piam/mrlandcore/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/mrlandcore) @@ -38,7 +38,7 @@ In case of questions / problems please contact Felicitas Beier . +Beier F, Karstens K, Alves M, Philipp Dietrich J, Leon Bodirsky B, Hoetten D, Humpenoeder F, Heinke J, v. Jeetze P, Mishra A, Beier F, Wirth S, Chen D, Kreidenweis U (2024). _mrlandcore: One-line description of this awesome package_. R package version 0.1.0.9001, . A BibTeX entry for LaTeX users is @@ -47,7 +47,7 @@ A BibTeX entry for LaTeX users is title = {mrlandcore: One-line description of this awesome package}, author = {Felicitas Beier and Kristine Karstens and Marcos Alves and Jan {Philipp Dietrich} and Benjamin {Leon Bodirsky} and David Hoetten and Florian Humpenoeder and Jens Heinke and Patrick {v. Jeetze} and Abhijeet Mishra and Felcitas Beier and Stephen Wirth and David Chen and Ulrich Kreidenweis}, year = {2024}, - note = {R package version 0.1.0}, + note = {R package version 0.1.0.9001}, url = {https://github.com/pik-piam/mrlandcore}, } ```