From 79f23ecdfed913801af2aaaeafca0cce09d30d80 Mon Sep 17 00:00:00 2001 From: mrustl Date: Mon, 30 Aug 2021 10:59:51 +0200 Subject: [PATCH 01/13] Fix :book to be in line with function defaults --- R/random_distribution.R | 43 ++++++++++++++++------------- man/create_random_distribution.Rd | 45 +++++++++++++++++-------------- 2 files changed, 50 insertions(+), 38 deletions(-) diff --git a/R/random_distribution.R b/R/random_distribution.R index 9946d0ee..5e234c05 100644 --- a/R/random_distribution.R +++ b/R/random_distribution.R @@ -89,44 +89,51 @@ get_percentile <- function(percent_within_minmax = 0.9) } #' Create random distribution -#' @param type "uniform" calls runif(), "log10_uniform" calls -#' 10^runif(number_of_events, log10_min, log10_max), "triangle" calls -#' EnvStats::rtri(), "lognorm" calls rlnorm(), "norm" calls rnorm() and -#' "log10_norm" calls 10^rnorm(number_of_events, mean = log10_mean, +#' @param type "uniform" calls \code{\link[stats]{runif}}, "log10_uniform" calls +#' 10^\code{\link[stats]{runif}}(number_of_events, log10_min, log10_max), "triangle" +#' calls \code{\link[EnvStats]{rtri}}, "lognorm" calls \code{\link[stats]{rlnorm}}, +#' "norm" calls \code{\link[stats]{rnorm}} and "log10_norm" calls +#' 10^\code{\link[stats]{rnorm}}(number_of_events, mean = log10_mean, #' sdev = log10_sdev), (default: "uniform") #' @param number_of_repeatings how often should the random distribution with the #' same parameters be generated (default: 1) #' @param number_of_events number of events #' @param value constant value (no random number), gets repeated number_of_events #' times (if 'type' = 'value') -#' @param min minimum value (default: 10), only used if 'type' is "runif" or +#' @param min minimum value (default: 10), only used if 'type' is "uniform" or #' "triangle" -#' @param max maximum value (default: 1000), only used if 'type' is "runif" or +#' @param max maximum value (default: 1000), only used if 'type' is "uniform" or #' "triangle" #' @param percent_within_minmax percent of data point within min/max (default: -#' 0.9 i.e. 90 percent +#' 0.9 i.e. 90 percent,see also \code{\link{get_percentile}} #' @param min_zero only used if 'type' is "log10_uniform" or #' "log10_norm", "norm" or "lognorm" and "min" value equal zero. #' In this case the zero is replaced by this value (default: 0.01), see also #' \code{\link{default_min}} -#' @param log10_min minimum value (default: default_min(min, max, +#' @param log10_min minimum value (default: \code{\link{default_min}}(min, max, #' min_zero, f = log10)), only used if 'type' is "log10_uniform" or "log10_norm" -#' @param log10_max maximum value (default: ifelse(max > 0, log10(max), -#' log10_zero_threshold), only used if 'type' is "log10_uniform" or "log10_norm" +#' @param log10_max maximum value (default: \code{\link{default_max}}(max, +#' min_zero * 10, f = log10)), only used if 'type' is "log10_uniform" or "log10_norm" #' @param log10_mean mean value (default: (log10_min + log10_max)/2), only used #' if 'type' is "log10_norm" #' @param log10_sdev standard deviation (default: abs((log10_max- log10_mean) / #' get_percentile(0.95)), only used if 'type' is "log10_norm" #' @param mean mean value (default: (default_min(min, max, min_zero) / #' default_max(max, 10*min_zero)) / 2), only used if 'type' is "norm" -#' @param sdev standard deviation (default: abs((default_max(max, 10*min_zero) - -#' mean) / get_percentile(0.95))), only used if 'type' is "norm" -#' @param meanlog log mean value (default: mean(log((min + max) / 2))), only +#' @param sdev standard deviation (default: abs((log10_max - log10_mean) / +#' \code{\link{get_percentile}}(percent_within_minmax))), only used if 'type' is +#' "norm" +#' @param meanlog log mean value (default: +#' mean(log( \code{\link{default_min}}(min, max, min_zero) + +#' \code{\link{default_max}}(max, 10 * min_zero)) / 2)), only #' used if 'type' is "lognorm" -#' @param sdlog standard deviation (default: abs(sd(c(default_min(min, max, -#' min_zero, f = log)))) ), only used if 'type' is "lognorm" -#' @param mode (default: default_min(min, max, min_zero) + -#' default_max(max, 10 * min_zero) / 2), only used if 'type' is "triangle" +#' @param sdlog standard deviation (default: abs(sd(c( +#' \code{\link{default_min}}(min, max, min_zero, f = log), +#' \code{\link{default_max}}(max, 10 * min_zero, f = log)))), +#' only used if 'type' is "lognorm" +#' @param mode (default: \code{\link{default_min}}(min, max, min_zero) + +#' \code{\link{default_max}}(max, 10 * min_zero) / 2), only used if 'type' is +#' "triangle" #' @param debug print debug information (default: TRUE) #' @return list with parameters of user defined random distribution and #' corresponding values @@ -134,7 +141,7 @@ get_percentile <- function(percent_within_minmax = 0.9) #' @importFrom stats sd qnorm runif rnorm rlnorm #' @importFrom dplyr mutate #' @importFrom rlang .data -#' @seealso for random triangle see \code{\link{rtri}}, for default +#' @seealso for random triangle see \code{\link[stats]{rtri}}, for default #' min/max see \code{\link{default_min}}, \code{\link{default_max}} and #' \code{\link{get_percentile}} #' diff --git a/man/create_random_distribution.Rd b/man/create_random_distribution.Rd index 82251d4d..6ce12a27 100644 --- a/man/create_random_distribution.Rd +++ b/man/create_random_distribution.Rd @@ -29,10 +29,11 @@ create_random_distribution( ) } \arguments{ -\item{type}{"uniform" calls runif(), "log10_uniform" calls -10^runif(number_of_events, log10_min, log10_max), "triangle" calls -EnvStats::rtri(), "lognorm" calls rlnorm(), "norm" calls rnorm() and -"log10_norm" calls 10^rnorm(number_of_events, mean = log10_mean, +\item{type}{"uniform" calls \code{\link[stats]{runif}}, "log10_uniform" calls +10^\code{\link[stats]{runif}}(number_of_events, log10_min, log10_max), "triangle" +calls \code{\link[EnvStats]{rtri}}, "lognorm" calls \code{\link[stats]{rlnorm}}, +"norm" calls \code{\link[stats]{rnorm}} and "log10_norm" calls +10^\code{\link[stats]{rnorm}}(number_of_events, mean = log10_mean, sdev = log10_sdev), (default: "uniform")} \item{number_of_repeatings}{how often should the random distribution with the @@ -43,25 +44,25 @@ same parameters be generated (default: 1)} \item{value}{constant value (no random number), gets repeated number_of_events times (if 'type' = 'value')} -\item{min}{minimum value (default: 10), only used if 'type' is "runif" or +\item{min}{minimum value (default: 10), only used if 'type' is "uniform" or "triangle"} -\item{max}{maximum value (default: 1000), only used if 'type' is "runif" or +\item{max}{maximum value (default: 1000), only used if 'type' is "uniform" or "triangle"} \item{percent_within_minmax}{percent of data point within min/max (default: -0.9 i.e. 90 percent} +0.9 i.e. 90 percent,see also \code{\link{get_percentile}}} \item{min_zero}{only used if 'type' is "log10_uniform" or "log10_norm", "norm" or "lognorm" and "min" value equal zero. In this case the zero is replaced by this value (default: 0.01), see also \code{\link{default_min}}} -\item{log10_min}{minimum value (default: default_min(min, max, +\item{log10_min}{minimum value (default: \code{\link{default_min}}(min, max, min_zero, f = log10)), only used if 'type' is "log10_uniform" or "log10_norm"} -\item{log10_max}{maximum value (default: ifelse(max > 0, log10(max), -log10_zero_threshold), only used if 'type' is "log10_uniform" or "log10_norm"} +\item{log10_max}{maximum value (default: \code{\link{default_max}}(max, +min_zero * 10, f = log10)), only used if 'type' is "log10_uniform" or "log10_norm"} \item{log10_mean}{mean value (default: (log10_min + log10_max)/2), only used if 'type' is "log10_norm"} @@ -72,17 +73,23 @@ get_percentile(0.95)), only used if 'type' is "log10_norm"} \item{mean}{mean value (default: (default_min(min, max, min_zero) / default_max(max, 10*min_zero)) / 2), only used if 'type' is "norm"} -\item{sdev}{standard deviation (default: abs((default_max(max, 10*min_zero) - -mean) / get_percentile(0.95))), only used if 'type' is "norm"} +\item{sdev}{standard deviation (default: abs((log10_max - log10_mean) / +\code{\link{get_percentile}}(percent_within_minmax))), only used if 'type' is +"norm"} -\item{meanlog}{log mean value (default: mean(log((min + max) / 2))), only +\item{meanlog}{log mean value (default: +mean(log( \code{\link{default_min}}(min, max, min_zero) + +\code{\link{default_max}}(max, 10 * min_zero)) / 2)), only used if 'type' is "lognorm"} -\item{sdlog}{standard deviation (default: abs(sd(c(default_min(min, max, -min_zero, f = log)))) ), only used if 'type' is "lognorm"} +\item{sdlog}{standard deviation (default: abs(sd(c( +\code{\link{default_min}}(min, max, min_zero, f = log), +\code{\link{default_max}}(max, 10 * min_zero, f = log)))), +only used if 'type' is "lognorm"} -\item{mode}{(default: default_min(min, max, min_zero) + -default_max(max, 10 * min_zero) / 2), only used if 'type' is "triangle"} +\item{mode}{(default: \code{\link{default_min}}(min, max, min_zero) + +\code{\link{default_max}}(max, 10 * min_zero) / 2), only used if 'type' is +"triangle"} \item{debug}{print debug information (default: TRUE)} } @@ -94,7 +101,5 @@ corresponding values Create random distribution } \seealso{ -for random triangle see \code{\link{rtri}}, for default -min/max see \code{\link{default_min}}, \code{\link{default_max}} and -\code{\link{get_percentile}} + } From f0e443602fb078a4c0e2fa7102287380a60f22a7 Mon Sep 17 00:00:00 2001 From: mrustl Date: Thu, 9 Sep 2021 10:00:26 +0200 Subject: [PATCH 02/13] Fix :book: --- R/random_distribution.R | 7 ++++--- man/create_random_distribution.Rd | 11 +++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/R/random_distribution.R b/R/random_distribution.R index 5e234c05..cae0975a 100644 --- a/R/random_distribution.R +++ b/R/random_distribution.R @@ -117,9 +117,10 @@ get_percentile <- function(percent_within_minmax = 0.9) #' @param log10_mean mean value (default: (log10_min + log10_max)/2), only used #' if 'type' is "log10_norm" #' @param log10_sdev standard deviation (default: abs((log10_max- log10_mean) / -#' get_percentile(0.95)), only used if 'type' is "log10_norm" -#' @param mean mean value (default: (default_min(min, max, min_zero) / -#' default_max(max, 10*min_zero)) / 2), only used if 'type' is "norm" +#' \code{\link{get_percentile}}(percent_within_minmax))), only used if 'type' is +#' "log10_norm" +#' @param mean mean value (default: (\code{\link{default_min}}(min, max, min_zero) / +#' \code{\link{default_max}}(max, 10*min_zero)) / 2), only used if 'type' is "norm" #' @param sdev standard deviation (default: abs((log10_max - log10_mean) / #' \code{\link{get_percentile}}(percent_within_minmax))), only used if 'type' is #' "norm" diff --git a/man/create_random_distribution.Rd b/man/create_random_distribution.Rd index 6ce12a27..92f332fe 100644 --- a/man/create_random_distribution.Rd +++ b/man/create_random_distribution.Rd @@ -68,10 +68,11 @@ min_zero * 10, f = log10)), only used if 'type' is "log10_uniform" or "log10_nor if 'type' is "log10_norm"} \item{log10_sdev}{standard deviation (default: abs((log10_max- log10_mean) / -get_percentile(0.95)), only used if 'type' is "log10_norm"} +\code{\link{get_percentile}}(percent_within_minmax))), only used if 'type' is +"log10_norm"} -\item{mean}{mean value (default: (default_min(min, max, min_zero) / -default_max(max, 10*min_zero)) / 2), only used if 'type' is "norm"} +\item{mean}{mean value (default: (\code{\link{default_min}}(min, max, min_zero) / +\code{\link{default_max}}(max, 10*min_zero)) / 2), only used if 'type' is "norm"} \item{sdev}{standard deviation (default: abs((log10_max - log10_mean) / \code{\link{get_percentile}}(percent_within_minmax))), only used if 'type' is @@ -101,5 +102,7 @@ corresponding values Create random distribution } \seealso{ - +for random triangle see \code{\link[stats]{rtri}}, for default +min/max see \code{\link{default_min}}, \code{\link{default_max}} and +\code{\link{get_percentile}} } From d654cd0d1e01cf400284e1ae9bb0effa056018ab Mon Sep 17 00:00:00 2001 From: mrustl Date: Thu, 9 Sep 2021 10:17:33 +0200 Subject: [PATCH 03/13] Remove fixed version dependency --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index a4ab970a..014e12c3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -66,8 +66,8 @@ Suggests: VignetteBuilder: knitr Remotes: - github::kwb-r/kwb.utils@v0.7.0, - github::kwb-r/qmra.db@v0.10.0 + github::kwb-r/kwb.utils, + github::kwb-r/qmra.db Encoding: UTF-8 LazyLoad: yes RoxygenNote: 7.1.1 From 20929a0983b9a25c9777fbfe8e6eb787e2d19eb5 Mon Sep 17 00:00:00 2001 From: mrustl Date: Fri, 10 Sep 2021 12:35:33 +0200 Subject: [PATCH 04/13] Add github token to fix gh-actions --- .github/workflows/R-CMD-check.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 909fbdff..510d6b43 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -29,6 +29,7 @@ jobs: - {os: windows-latest, r: 'release'} env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_REMOTES_NO_ERRORS_FROM_WARNINGS: true RSPM: ${{ matrix.config.rspm }} From 1345b07d6a7db49e1937f172d9172e63cbf839cd Mon Sep 17 00:00:00 2001 From: mrustl Date: Fri, 10 Sep 2021 13:31:42 +0200 Subject: [PATCH 05/13] Fix cross-link --- R/random_distribution.R | 2 +- man/create_random_distribution.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/random_distribution.R b/R/random_distribution.R index cae0975a..607bb163 100644 --- a/R/random_distribution.R +++ b/R/random_distribution.R @@ -142,7 +142,7 @@ get_percentile <- function(percent_within_minmax = 0.9) #' @importFrom stats sd qnorm runif rnorm rlnorm #' @importFrom dplyr mutate #' @importFrom rlang .data -#' @seealso for random triangle see \code{\link[stats]{rtri}}, for default +#' @seealso for random triangle see \code{\link[EnvStats]{rtri}}, for default #' min/max see \code{\link{default_min}}, \code{\link{default_max}} and #' \code{\link{get_percentile}} #' diff --git a/man/create_random_distribution.Rd b/man/create_random_distribution.Rd index 92f332fe..b80761d8 100644 --- a/man/create_random_distribution.Rd +++ b/man/create_random_distribution.Rd @@ -102,7 +102,7 @@ corresponding values Create random distribution } \seealso{ -for random triangle see \code{\link[stats]{rtri}}, for default +for random triangle see \code{\link[EnvStats]{rtri}}, for default min/max see \code{\link{default_min}}, \code{\link{default_max}} and \code{\link{get_percentile}} } From 4f878a938293bf4285f0590860181dc5879c8426 Mon Sep 17 00:00:00 2001 From: mrustl Date: Wed, 8 Jun 2022 16:08:47 +0200 Subject: [PATCH 06/13] Harmonise with kwb.pkgbuild --- .github/workflows/R-CMD-check.yaml | 6 ++-- DESCRIPTION | 46 ++++++++++-------------------- LICENSE | 2 +- LICENSE.md | 2 +- NEWS.md | 4 +++ _pkgdown.yaml | 45 +++++++++++++++++------------ index.md | 14 +++++++-- 7 files changed, 63 insertions(+), 56 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 510d6b43..2bf5cb4e 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -22,9 +22,9 @@ jobs: fail-fast: false matrix: config: - - {os: macOS-latest, r: 'release'} - - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} - - {os: windows-latest, r: 'devel'} + - {os: macOS-latest, r: 'release'} + - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {os: windows-latest, r: 'devel'} - {os: windows-latest, r: 'oldrel'} - {os: windows-latest, r: 'release'} diff --git a/DESCRIPTION b/DESCRIPTION index 014e12c3..080ddafe 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,35 +1,19 @@ Package: kwb.qmra Title: QMRA (quantitative microbial risk assessment) -Version: 0.3.0 -Authors@R: - c(person(given = "Michael", - family = "Rustler", - role = c("aut", "cre"), - email = "michael.rustler@kompetenz-wasser.de", - comment = c(ORCID = "0000-0003-0647-7726")), - person(given = "Hauke", - family = "Sonnenberg", - role = "aut", - email = "hauke.sonnenberg@kompetenz-wasser.de", - comment = c(ORCID = "0000-0001-9134-2871")), - person(given = "Wolfgang", - family = "Seis", - role = c("ctb", "rev"), - email = "wolfgang.seis@kompetenz-wasser.de", - comment = c(ORCID = "0000-0002-7436-8575")), - person(given = "Ralf", - family = "Junghanns", - role = c("ctb"), - email = "ralf.junghanns@gmail.com", - comment = c(ORCID = "")), - person(given = "Kompetenzzentrum Wasser Berlin gGmbH", - role = "cph"), - person(given = "AquaNES", - role = "fnd"), - person(given = "DEMOWARE", - role = "fnd"), - person(given = "Smart-Control", - role = "fnd")) +Version: 0.3.1 +Authors@R: c( + person("Michael", "Rustler", , "michael.rustler@kompetenz-wasser.de", role = c("aut", "cre"), + comment = c(ORCID = "0000-0003-0647-7726")), + person("Hauke", "Sonnenberg", , "hauke.sonnenberg@kompetenz-wasser.de", role = "aut", + comment = c(ORCID = "0000-0001-9134-2871")), + person("Wolfgang", "Seis", , "wolfgang.seis@kompetenz-wasser.de", role = c("ctb", "rev"), + comment = c(ORCID = "0000-0002-7436-8575")), + person("Ralf", "Junghanns", , "ralf.junghanns@gmail.com", role = "ctb"), + person("Kompetenzzentrum Wasser Berlin gGmbH (KWB)", role = "cph"), + person("AquaNES", role = "fnd"), + person("DEMOWARE", role = "fnd"), + person("Smart-Control", role = "fnd") + ) Description: QMRA for water supply systems. License: MIT + file LICENSE URL: http://github.com/KWB-R/kwb.qmra/ @@ -68,7 +52,7 @@ VignetteBuilder: Remotes: github::kwb-r/kwb.utils, github::kwb-r/qmra.db +Config/testthat/edition: 3 Encoding: UTF-8 LazyLoad: yes RoxygenNote: 7.1.1 -Config/testthat/edition: 3 diff --git a/LICENSE b/LICENSE index 5c156c7f..7be0cba1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2016 - 2020 Kompetenzzentrum Wasser Berlin gGmbH (KWB) +Copyright (c) 2016 - 2022 Kompetenzzentrum Wasser Berlin gGmbH (KWB) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/LICENSE.md b/LICENSE.md index 68a6145e..3a13a300 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # MIT License -Copyright (c) 2016 - 2020 Kompetenzzentrum Wasser Berlin gGmbH (KWB) +Copyright (c) 2016 - 20220 Kompetenzzentrum Wasser Berlin gGmbH (KWB) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/NEWS.md b/NEWS.md index 5572ec84..a3d3f46f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# [kwb.qmra 0.3.1](https://github.com/KWB-R/kwb.qmra/releases/tag/v0.3.1) 2022-06-08 + +* Harmonise with kwb.pkgbuild + # [kwb.qmra 0.3.0](https://github.com/KWB-R/kwb.qmra/releases/tag/v0.3.0) 2021-02-23 Adaptions for project [Smart-Control](https://www.kompetenz-wasser.de/en/project/smart-control/): diff --git a/_pkgdown.yaml b/_pkgdown.yaml index c03e17bc..c4e17732 100644 --- a/_pkgdown.yaml +++ b/_pkgdown.yaml @@ -2,28 +2,37 @@ authors: Michael Rustler: href: https://mrustl.de Hauke Sonnenberg: - href: https://github.com/hsonne + href: https://www.kompetenz-wasser.de/en/ueber-uns/team/hauke-sonnenberg Wolfgang Seis: - href: https://www.researchgate.net/profile/Wolfgang_Seis - Kompetenzzentrum Wasser Berlin gGmbH: - href: https://www.kompetenz-wasser.de - html: - AquaNES: - href: https://www.kompetenz-wasser.de/en/project/aquanes/ - html: + href: https://www.kompetenz-wasser.de/en/ueber-uns/team/wolfgang-seis + AquaNES: + href: https://www.kompetenz-wasser.de/en/forschung/projekte/aquanes + html: Project AquaNES DEMOWARE: - href: https://www.kompetenz-wasser.de/en/project/demoware/ - html: + href: https://www.kompetenz-wasser.de/en/forschung/projekte/demoware/ + html: Project DEMOWARE Smart-Control: - href: https://www.kompetenz-wasser.de/en/project/smart-control/ - html: + href: https://www.kompetenz-wasser.de/en/forschung/projekte/smart-control/ + html: Project Smart-Control + Kompetenzzentrum Wasser Berlin gGmbH (KWB): + href: https://www.kompetenz-wasser.de + html: KWB template: - params: - bootswatch: cerulean - docsearch: - api_key: ba545525664b60ab9e580ae0f7f4ac02 - index_name: kwb_qmra + bootstrap: 5 + bootswatch: cerulean + bslib: + bg: '#ffffff' + fg: '#000000' + primary: '#007aff' + border-radius: 0.5rem + btn-border-radius: 0.25rem +development: + mode: auto + navbar: title: ~ type: default diff --git a/index.md b/index.md index 6c740ee7..57ac880e 100644 --- a/index.md +++ b/index.md @@ -11,7 +11,17 @@ An R package for QMRA (quantitative microbial risk assessment) of water supply s ## Installation +For installing the latest release of this R package run the following code below: + ```r -#install.packages("remotes", repos = "https://cloud.r-project.org") -remotes::install_github("KWB-R/kwb.qmra") +# Enable repository from kwb-r +options(repos = c( + kwbr = 'https://kwb-r.r-universe.dev', + CRAN = 'https://cloud.r-project.org')) + +# Download and install kwb.qmra in R +install.packages('kwb.qmra') + +# Browse the kwb.qmra manual pages +help(package = 'kwb.qmra') ``` \ No newline at end of file From 28dcf745d965b3605b2f97722d5365f0e2cb7136 Mon Sep 17 00:00:00 2001 From: mrustl Date: Wed, 8 Jun 2022 16:17:49 +0200 Subject: [PATCH 07/13] Add badges and try auto-roxgen /document --- README.md | 19 +++++++++++++++++++ index.md | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 29cabebe..a221aed2 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ [![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing) [![DOI](https://zenodo.org/badge/68301647.svg)](https://zenodo.org/badge/latestdoi/68301647) [![Binder](http://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/kwb-r/kwb.qmra/master?urlpath=rstudio) +[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/kwb.qmra)]( +[![R-Universe_Status_Badge](https://kwb-r.r-universe.dev/badges/kwb.qmra)](https://kwb-r.r-universe.dev/) # kwb.qmra @@ -13,6 +15,23 @@ Launch repository (from master) in cloud RStudio session: [![Binder](http://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/kwb-r/kwb.qmra/master?urlpath=rstudio) +## Installation + +For installing the latest release of this R package run the following code below: + +```r +# Enable repository from kwb-r +options(repos = c( + kwbr = 'https://kwb-r.r-universe.dev', + CRAN = 'https://cloud.r-project.org')) + +# Download and install kwb.qmra in R +install.packages('kwb.qmra') + +# Browse the kwb.qmra manual pages +help(package = 'kwb.qmra') +``` + ## Documentation Development version: [https://kwb-r.github.io/kwb.qmra/dev](https://kwb-r.github.io/kwb.qmra/dev) diff --git a/index.md b/index.md index 57ac880e..6a91efff 100644 --- a/index.md +++ b/index.md @@ -4,7 +4,8 @@ [![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing) [![DOI](https://zenodo.org/badge/68301647.svg)](https://zenodo.org/badge/latestdoi/68301647) [![Binder](http://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/kwb-r/kwb.qmra/master?urlpath=rstudio) - +[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/kwb.qmra)]( +[![R-Universe_Status_Badge](https://kwb-r.r-universe.dev/badges/kwb.qmra)](https://kwb-r.r-universe.dev/) An R package for QMRA (quantitative microbial risk assessment) of water supply systems From 38e58f08495c65b06844b0715280e7f53cf71459 Mon Sep 17 00:00:00 2001 From: mrustl Date: Wed, 8 Jun 2022 16:20:51 +0200 Subject: [PATCH 08/13] Add DESCRIPTION (/document) --- .github/workflows/pr-commands.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-commands.yaml b/.github/workflows/pr-commands.yaml index 0d3cb716..06a12d1b 100644 --- a/.github/workflows/pr-commands.yaml +++ b/.github/workflows/pr-commands.yaml @@ -21,7 +21,7 @@ jobs: run: Rscript -e 'roxygen2::roxygenise()' - name: commit run: | - git add man/\* NAMESPACE + git add man/\* NAMESPACE DESCRIPTION git commit -m 'Document' - uses: r-lib/actions/pr-push@master with: From 0e7a0424a78eb96e8d1b5ea65128e806c7f698f3 Mon Sep 17 00:00:00 2001 From: mrustl Date: Wed, 8 Jun 2022 16:49:35 +0200 Subject: [PATCH 09/13] Fix pkgdown workflow by adding missing topics --- _pkgdown.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/_pkgdown.yaml b/_pkgdown.yaml index c4e17732..ed4fa2ec 100644 --- a/_pkgdown.yaml +++ b/_pkgdown.yaml @@ -98,6 +98,14 @@ reference: Functions for plotting QMRA results contents: - starts_with("plot_") + + - title: Datasets + desc: > + Datasets within R package + contents: + - config_default_json + - config_dummy_json + - risk_dummy_json - title: Export data desc: > @@ -109,16 +117,22 @@ reference: - title: Helper functions desc: > Helper functions for performing QMRA - contents: + contents: + - backcalc_infectionRisk_perDay + - calc_health_risk + - calc_infection_risk - config_write_dummy - create_random_distribution - - start_with("default") + - default_max + - default_min - generate_random_values + - get_percentile - distribution_repeater - dr.betapoisson - dr.db_download - dr.db_model - dr.expo - poisson_dose + - run_app - who_getTreatment From 344529cfa320fa3ee3914d55ef479ce63d06c33b Mon Sep 17 00:00:00 2001 From: mrustl Date: Wed, 8 Jun 2022 17:30:31 +0200 Subject: [PATCH 10/13] Fix badges typo --- README.md | 2 +- index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a221aed2..bdb9a2fd 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing) [![DOI](https://zenodo.org/badge/68301647.svg)](https://zenodo.org/badge/latestdoi/68301647) [![Binder](http://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/kwb-r/kwb.qmra/master?urlpath=rstudio) -[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/kwb.qmra)]( +[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/kwb.qmra)]() [![R-Universe_Status_Badge](https://kwb-r.r-universe.dev/badges/kwb.qmra)](https://kwb-r.r-universe.dev/) # kwb.qmra diff --git a/index.md b/index.md index 6a91efff..5214b3ab 100644 --- a/index.md +++ b/index.md @@ -4,7 +4,7 @@ [![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing) [![DOI](https://zenodo.org/badge/68301647.svg)](https://zenodo.org/badge/latestdoi/68301647) [![Binder](http://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/kwb-r/kwb.qmra/master?urlpath=rstudio) -[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/kwb.qmra)]( +[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/kwb.qmra)]() [![R-Universe_Status_Badge](https://kwb-r.r-universe.dev/badges/kwb.qmra)](https://kwb-r.r-universe.dev/) An R package for QMRA (quantitative microbial risk assessment) of water supply systems From b6e95942c0d2a1115210f7f0d34c4a6db53e7376 Mon Sep 17 00:00:00 2001 From: mrustl Date: Wed, 8 Jun 2022 17:32:26 +0200 Subject: [PATCH 11/13] Automatic determine navbar light/dark theme --- _pkgdown.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/_pkgdown.yaml b/_pkgdown.yaml index ed4fa2ec..01e4c875 100644 --- a/_pkgdown.yaml +++ b/_pkgdown.yaml @@ -35,7 +35,6 @@ development: navbar: title: ~ - type: default left: - text: Background href: articles/general.html From 0cbd7d7423be8e2556f308deabb964d2738fcb9f Mon Sep 17 00:00:00 2001 From: mrustl Date: Thu, 9 Jun 2022 11:53:55 +0200 Subject: [PATCH 12/13] Roll-back version (only update :book: website) --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 080ddafe..46146f4b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: kwb.qmra Title: QMRA (quantitative microbial risk assessment) -Version: 0.3.1 +Version: 0.3.0 Authors@R: c( person("Michael", "Rustler", , "michael.rustler@kompetenz-wasser.de", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-0647-7726")), From 025f91b37cb26c338557f97b09101f45e1b71731 Mon Sep 17 00:00:00 2001 From: mrustl Date: Thu, 9 Jun 2022 11:54:56 +0200 Subject: [PATCH 13/13] Set to development version for preparing bugfix release v0.3.1 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 46146f4b..6416b313 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: kwb.qmra Title: QMRA (quantitative microbial risk assessment) -Version: 0.3.0 +Version: 0.3.0.9000 Authors@R: c( person("Michael", "Rustler", , "michael.rustler@kompetenz-wasser.de", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-0647-7726")),