diff --git a/DESCRIPTION b/DESCRIPTION index 50b18c465..8c9c7516a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -68,6 +68,7 @@ Imports: VGAM Suggests: covr, + car, doFuture, dplyr, fitdistrplus, diff --git a/NAMESPACE b/NAMESPACE index ca6d47558..2cc63e5fc 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -53,6 +53,7 @@ export(geom_xribbon) export(glance) export(is.fitdists) export(is_censored) +export(licensing_md) export(logLik) export(nobs) export(npars) diff --git a/R/augment.R b/R/augment.R index 4c39bb3e6..055af3c3e 100644 --- a/R/augment.R +++ b/R/augment.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/autoplot.R b/R/autoplot.R index 4dd9de75c..1afd50c46 100644 --- a/R/autoplot.R +++ b/R/autoplot.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/bcanz.R b/R/bcanz.R index 95a50f562..929ec03bc 100644 --- a/R/bcanz.R +++ b/R/bcanz.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/boot.R b/R/boot.R index d301b96be..f6b058bd3 100644 --- a/R/boot.R +++ b/R/boot.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/burrlioz.R b/R/burrlioz.R index 709d55d72..49240514b 100644 --- a/R/burrlioz.R +++ b/R/burrlioz.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/burrrIII3.R b/R/burrrIII3.R index 575e4e56d..d1b1d3d4f 100644 --- a/R/burrrIII3.R +++ b/R/burrrIII3.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/censor.R b/R/censor.R index 32d45cc90..1488e16ef 100644 --- a/R/censor.R +++ b/R/censor.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/censored.R b/R/censored.R index 66a3b2b9f..23c5e46f4 100644 --- a/R/censored.R +++ b/R/censored.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/chk.R b/R/chk.R index b85f1d7de..e7c52cc86 100644 --- a/R/chk.R +++ b/R/chk.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/cis.R b/R/cis.R index a5ed875cf..f84ce9843 100644 --- a/R/cis.R +++ b/R/cis.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/coef.R b/R/coef.R index f1050a90c..a8946c63a 100644 --- a/R/coef.R +++ b/R/coef.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/convergence.R b/R/convergence.R index 70ce9c53b..1554f1c2d 100644 --- a/R/convergence.R +++ b/R/convergence.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/data.R b/R/data.R index 214d94d38..962b76f82 100644 --- a/R/data.R +++ b/R/data.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/devtools-helpers.R b/R/devtools-helpers.R index b56dcaf70..f0ed48eb1 100644 --- a/R/devtools-helpers.R +++ b/R/devtools-helpers.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/dists.R b/R/dists.R index 42e0dec0e..90474fd4f 100644 --- a/R/dists.R +++ b/R/dists.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/estimates.R b/R/estimates.R index 239aaa072..7479f1f40 100644 --- a/R/estimates.R +++ b/R/estimates.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/exposure.R b/R/exposure.R index add6e8bb9..5f766d6a2 100644 --- a/R/exposure.R +++ b/R/exposure.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/fit-burrlioz.R b/R/fit-burrlioz.R index f55fc63f3..73020d013 100644 --- a/R/fit-burrlioz.R +++ b/R/fit-burrlioz.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/fit.R b/R/fit.R index 50cd9abe0..9bd0e3c7e 100644 --- a/R/fit.R +++ b/R/fit.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/gamma.R b/R/gamma.R index bc794f82a..ae6f31754 100644 --- a/R/gamma.R +++ b/R/gamma.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/getters.R b/R/getters.R index 4e7636027..39735fc8a 100644 --- a/R/getters.R +++ b/R/getters.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/ggplot.R b/R/ggplot.R index b1586a3d6..d100b50fa 100644 --- a/R/ggplot.R +++ b/R/ggplot.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/ggproto.R b/R/ggproto.R index 3b62fe9c0..6083330a7 100644 --- a/R/ggproto.R +++ b/R/ggproto.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/glance.R b/R/glance.R index 64f7b2ffa..ee67a493f 100644 --- a/R/glance.R +++ b/R/glance.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/gof.R b/R/gof.R index 746e9dc2b..7f8c8acb8 100644 --- a/R/gof.R +++ b/R/gof.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/gompertz.R b/R/gompertz.R index 612f1f370..5b1a76d65 100644 --- a/R/gompertz.R +++ b/R/gompertz.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/hc-burrlioz.R b/R/hc-burrlioz.R index d964d263f..f672de9c2 100644 --- a/R/hc-burrlioz.R +++ b/R/hc-burrlioz.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/hc.R b/R/hc.R index 86fc99e76..8b7368052 100644 --- a/R/hc.R +++ b/R/hc.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/helpers.R b/R/helpers.R index 70829db72..18f47d2e3 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/hp.R b/R/hp.R index 56bab399e..553665789 100644 --- a/R/hp.R +++ b/R/hp.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/internal.R b/R/internal.R index 02a5d55b6..ee8af01dd 100644 --- a/R/internal.R +++ b/R/internal.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/invpareto.R b/R/invpareto.R index f58e827e6..a2a3e48c0 100644 --- a/R/invpareto.R +++ b/R/invpareto.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/is.R b/R/is.R index eb037352b..a2ff981be 100644 --- a/R/is.R +++ b/R/is.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/lgumbel.R b/R/lgumbel.R index 020b8baba..0ebfa0e8e 100644 --- a/R/lgumbel.R +++ b/R/lgumbel.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/licensing.R b/R/licensing.R new file mode 100644 index 000000000..f996617b0 --- /dev/null +++ b/R/licensing.R @@ -0,0 +1,22 @@ +#' Licensing Markdown +#' +#' A string of markdown code indicating the licensing of the code +#' and documentation +#' @export +#' @examples +#' licensing_md() +licensing_md <- function() { +"## Licensing + + Copyright 2023 Province of British Columbia, + Environment and Climate Change Canada, and + Australian Government Department of + Climate Change, Energy, the Environment and Water + + The documentation is released under the + [CC BY 4.0 License](https://creativecommons.org/licenses/by/4.0/) + + The code is released under the + [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) +" +} diff --git a/R/llogis-llogis.R b/R/llogis-llogis.R index 530eb24f0..e778a71e7 100644 --- a/R/llogis-llogis.R +++ b/R/llogis-llogis.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/llogis.R b/R/llogis.R index 87aba8ebe..6fc74d4cb 100644 --- a/R/llogis.R +++ b/R/llogis.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/lnorm-lnorm.R b/R/lnorm-lnorm.R index bba4646d8..4b1e9f949 100644 --- a/R/lnorm-lnorm.R +++ b/R/lnorm-lnorm.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/lnorm.R b/R/lnorm.R index 38dd0df0f..08b36805c 100644 --- a/R/lnorm.R +++ b/R/lnorm.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/logLik.R b/R/logLik.R index ebf897b13..cf9fbd2b9 100644 --- a/R/logLik.R +++ b/R/logLik.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/match-moments.R b/R/match-moments.R index 2d2253efb..7bae667a1 100644 --- a/R/match-moments.R +++ b/R/match-moments.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/nobs.R b/R/nobs.R index a22cfc972..17aa96bac 100644 --- a/R/nobs.R +++ b/R/nobs.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/npars.R b/R/npars.R index 5837c164d..5be46bc54 100644 --- a/R/npars.R +++ b/R/npars.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/params.R b/R/params.R index 06eb3247b..d3899c936 100644 --- a/R/params.R +++ b/R/params.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -107,4 +107,4 @@ #' @param ... Unused. #' @keywords internal #' @name params -NULL \ No newline at end of file +NULL diff --git a/R/plot-cdf.R b/R/plot-cdf.R index c223027aa..d57a8cc0a 100644 --- a/R/plot-cdf.R +++ b/R/plot-cdf.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/plot-cf.R b/R/plot-cf.R index 932452535..c74a15060 100644 --- a/R/plot-cf.R +++ b/R/plot-cf.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/plot-data.R b/R/plot-data.R index 5f06fe174..f955ff779 100644 --- a/R/plot-data.R +++ b/R/plot-data.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/plot.R b/R/plot.R index 7e4f03fd0..a357f6a2d 100644 --- a/R/plot.R +++ b/R/plot.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/pqr.R b/R/pqr.R index e9d722614..ef1cea1c0 100644 --- a/R/pqr.R +++ b/R/pqr.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/predict.R b/R/predict.R index 50fdc45a6..10785c0ea 100644 --- a/R/predict.R +++ b/R/predict.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/print.R b/R/print.R index bbf7cae2b..eec02d4ec 100644 --- a/R/print.R +++ b/R/print.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/seeds.R b/R/seeds.R index 78caaf904..fc4cd5b3f 100644 --- a/R/seeds.R +++ b/R/seeds.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/ssd-data.R b/R/ssd-data.R index b579456d0..4332e2642 100644 --- a/R/ssd-data.R +++ b/R/ssd-data.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/ssd-plot.R b/R/ssd-plot.R index 18c9eb17f..d285bc62b 100644 --- a/R/ssd-plot.R +++ b/R/ssd-plot.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/ssdtools-package.R b/R/ssdtools-package.R index be7f2e64d..dde54d0bd 100644 --- a/R/ssdtools-package.R +++ b/R/ssdtools-package.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/subset.R b/R/subset.R index 7ce4a18ac..d71c83888 100644 --- a/R/subset.R +++ b/R/subset.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/summary.R b/R/summary.R index d0f571876..e90760bb0 100644 --- a/R/summary.R +++ b/R/summary.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/test-helpers.R b/R/test-helpers.R index bf82165ee..077f04446 100644 --- a/R/test-helpers.R +++ b/R/test-helpers.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/tidy.R b/R/tidy.R index accbd80ca..c2b906094 100644 --- a/R/tidy.R +++ b/R/tidy.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/tmb.R b/R/tmb.R index 9d571fa1d..72d862147 100644 --- a/R/tmb.R +++ b/R/tmb.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/utils.R b/R/utils.R index 184e7ad17..619a37e2d 100644 --- a/R/utils.R +++ b/R/utils.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/weibull.R b/R/weibull.R index 6b6643791..7aa49e3a2 100644 --- a/R/weibull.R +++ b/R/weibull.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/R/wqg.R b/R/wqg.R index a8534d9fd..d958cf91a 100644 --- a/R/wqg.R +++ b/R/wqg.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/README.Rmd b/README.Rmd index 0a6384861..262e0460b 100644 --- a/README.Rmd +++ b/README.Rmd @@ -138,30 +138,6 @@ If you would like to contribute to the package, please see our Please note that the ssdtools project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. -## License - -The code is released under the Apache License 2.0 - -Copyright 2021 Province of British Columbia and Environment and Climate Change Canada - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ------ - -Creative Commons Licence
ssdtools by the Province of British Columbia and Environment and Climate Change Canada - is licensed under a -Creative Commons Attribution 4.0 International License. +```{r, results = "asis", echo = FALSE} +cat(licensing_md()) +``` diff --git a/README.md b/README.md index a3b84711f..581b6f2ff 100644 --- a/README.md +++ b/README.md @@ -198,32 +198,14 @@ Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. -## License +## Licensing -The code is released under the Apache License 2.0 +Copyright 2023 Province of British Columbia, Environment and Climate +Change Canada, and Australian Government Department of Climate Change, +Energy, the Environment and Water -Copyright 2021 Province of British Columbia and Environment and Climate -Change Canada +The documentation is released under the [CC BY 4.0 +License](https://creativecommons.org/licenses/by/4.0/) -Licensed under the Apache License, Version 2.0 (the “License”); you may -not use this file except in compliance with the License. You may obtain -a copy of the License at - - - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an “AS IS” BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ------------------------------------------------------------------------- - -Creative Commons Licence
ssdtools by -the Province of British Columbia and -Environment and Climate Change Canada is licensed under a - -Creative Commons Attribution 4.0 International License. +The code is released under the [Apache License +2.0](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/_pkgdown.yml b/_pkgdown.yml index 3489d4572..c00402330 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -17,3 +17,89 @@ authors: href: "https://www.canada.ca/en/environment-climate-change.html" Australian Government Department of Climate Change, Energy, the Environment and Water: href: "https://www.dcceew.gov.au/" + +destination: docs + +reference: +- title: Tables + desc: Information as Data Frames + contents: + - '`boron_pred`' + - '`dist_data`' +- title: Calculate and Predict + desc: Calculate Values and Estimate Model Fit + contents: + - '`estimates.fitdists`' + - '`predict.fitburrlioz`' + - '`predict.fitdists`' + - '`ssd_ecd`' + - '`ssd_ecd_data`' + - '`ssd_exposure`' + - '`ssd_gof`' + - '`ssd_hc`' + - '`ssd_hc_bcanz`' + - '`ssd_hp`' + - '`ssd_match_moments`' + - '`ssd_wt_est`' + - '`ssd_wqg_bc`' + - '`ssd_wqg_burrlioz`' +- title: Distributions + desc: Distribution Functions + contents: + - '`ssd_dists`' + - '`ssd_dists_all`' + - '`ssd_dists_bcanz`' + - '`ssd_fit_bcanz`' + - '`ssd_fit_burrlioz`' + - '`ssd_fit_dists`' +- title: Plots + desc: Functions to Generate Plots + contents: + - '`autoplot.fitdists`' + - '`geom_hcintersect`' + - '`geom_ssdpoint`' + - '`geom_ssdsegment`' + - '`geom_xribbon`' + - '`scale_colour_ssd`' + - '`ssd_pal`' + - '`ssd_plot`' + - '`ssd_plot_cdf`' + - '`ssd_plot_data`' + - '`ssdtools-ggproto`' +- title: Query + desc: Query Parameters and Observations + contents: + - '`npars`' + - '`ssd_is_censored`' +- title: Test + desc: Test fitdist Objects + contents: + - '`is.fitdists`' +- title: Miscellaneous + desc: Format and Subset Objects + contents: + - '`augment.fitdists`' + - '`coef.fitdists`' + - '`comma_signif`' + - '`glance.fitdists`' + - '`licensing_md`' + - '`ssd_data`' + - '`ssd_sort_data`' + - '`subset.fitdists`' + - '`tidy.fitdists`' +- title: Deprecated + desc: Format and Subset Objects + contents: + - '`dgompertz`' + - '`pgompertz`' + - '`qgompertz`' + - '`rgompertz`' + - '`dlgumbel`' + - '`plgumbel`' + - '`qlgumbel`' + - '`rlgumbel`' + - '`geom_ssd`' + - '`is_censored`' + - '`ssd_hc_burrlioz`' + - '`ssd_plot_cf`' + - '`stat_ssd`' diff --git a/data-raw/data-raw.R b/data-raw/data-raw.R index fcac63cc2..db1b43195 100644 --- a/data-raw/data-raw.R +++ b/data-raw/data-raw.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/man/licensing_md.Rd b/man/licensing_md.Rd new file mode 100644 index 000000000..58d1977b6 --- /dev/null +++ b/man/licensing_md.Rd @@ -0,0 +1,15 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/licensing.R +\name{licensing_md} +\alias{licensing_md} +\title{Licensing Markdown} +\usage{ +licensing_md() +} +\description{ +A string of markdown code indicating the licensing of the code +and documentation +} +\examples{ +licensing_md() +} diff --git a/scripts/build.R b/scripts/build.R index be607fdb7..8c97d7ab9 100644 --- a/scripts/build.R +++ b/scripts/build.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,9 +18,9 @@ styler::style_pkg( filetype = c("R", "Rmd") ) -lintr::lint_package(linters = linters_with_defaults( - line_length_linter = line_length_linter(1000), - object_name_linter = object_name_linter(regexes = ".*")) +lintr::lint_package(linters = lintr::linters_with_defaults( + line_length_linter = lintr::line_length_linter(1000), + object_name_linter = lintr::object_name_linter(regexes = ".*")) ) lintr::lint_package() @@ -29,5 +29,6 @@ devtools::test() devtools::document() pkgdown::build_home() +pkgdown::build_reference() devtools::check() diff --git a/src/Makevars b/src/Makevars index d9427bd42..d36d1e7cc 100644 --- a/src/Makevars +++ b/src/Makevars @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/Makevars.win b/src/Makevars.win index 0316b5e9c..78afcca93 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/TMB/compile.R b/src/TMB/compile.R index 64be31dff..c4bbb7661 100644 --- a/src/TMB/compile.R +++ b/src/TMB/compile.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/TMB/ll_burrIII3.hpp b/src/TMB/ll_burrIII3.hpp index fe4be64c8..e2db2bdfd 100644 --- a/src/TMB/ll_burrIII3.hpp +++ b/src/TMB/ll_burrIII3.hpp @@ -1,4 +1,4 @@ -// Copyright 2021 Environment and Climate Change Canada +// Copyright 2023 Environment and Climate Change Canada // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/TMB/ll_gamma.hpp b/src/TMB/ll_gamma.hpp index ca6e9364f..dab2788f6 100644 --- a/src/TMB/ll_gamma.hpp +++ b/src/TMB/ll_gamma.hpp @@ -1,4 +1,4 @@ -// Copyright 2021 Environment and Climate Change Canada +// Copyright 2023 Environment and Climate Change Canada // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -95,4 +95,4 @@ Type ll_gamma(objective_function* obj) // normal with parameters mu and lo #define TMB_OBJECTIVE_PTR this #endif - \ No newline at end of file + diff --git a/src/TMB/ll_gompertz.hpp b/src/TMB/ll_gompertz.hpp index f50a2bcc7..961355d67 100644 --- a/src/TMB/ll_gompertz.hpp +++ b/src/TMB/ll_gompertz.hpp @@ -1,4 +1,4 @@ -// Copyright 2021 Environment and Climate Change Canada +// Copyright 2023 Environment and Climate Change Canada // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/TMB/ll_invpareto.hpp b/src/TMB/ll_invpareto.hpp index c0e8dec85..9b07fe41b 100644 --- a/src/TMB/ll_invpareto.hpp +++ b/src/TMB/ll_invpareto.hpp @@ -1,4 +1,4 @@ -// Copyright 2021 Environment and Climate Change Canada +// Copyright 2023 Environment and Climate Change Canada // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/TMB/ll_lgumbel.hpp b/src/TMB/ll_lgumbel.hpp index fb76a55c3..8496f5ac8 100644 --- a/src/TMB/ll_lgumbel.hpp +++ b/src/TMB/ll_lgumbel.hpp @@ -1,4 +1,4 @@ -// Copyright 2021 Environment and Climate Change Canada +// Copyright 2023 Environment and Climate Change Canada // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/TMB/ll_llogis.hpp b/src/TMB/ll_llogis.hpp index 64ca46e98..cec6cd45b 100644 --- a/src/TMB/ll_llogis.hpp +++ b/src/TMB/ll_llogis.hpp @@ -1,4 +1,4 @@ -// Copyright 2021 Environment and Climate Change Canada +// Copyright 2023 Environment and Climate Change Canada // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/TMB/ll_llogis_llogis.hpp b/src/TMB/ll_llogis_llogis.hpp index 39869c438..8e9138f78 100644 --- a/src/TMB/ll_llogis_llogis.hpp +++ b/src/TMB/ll_llogis_llogis.hpp @@ -1,4 +1,4 @@ -// Copyright 2021 Environment and Climate Change Canada +// Copyright 2023 Environment and Climate Change Canada // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/TMB/ll_lnorm.hpp b/src/TMB/ll_lnorm.hpp index e29158bcc..d72142427 100644 --- a/src/TMB/ll_lnorm.hpp +++ b/src/TMB/ll_lnorm.hpp @@ -1,4 +1,4 @@ -// Copyright 2021 Environment and Climate Change Canada +// Copyright 2023 Environment and Climate Change Canada // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/TMB/ll_lnorm_lnorm.hpp b/src/TMB/ll_lnorm_lnorm.hpp index afb739276..bb6742db0 100644 --- a/src/TMB/ll_lnorm_lnorm.hpp +++ b/src/TMB/ll_lnorm_lnorm.hpp @@ -1,4 +1,4 @@ -// Copyright 2021 Environment and Climate Change Canada +// Copyright 2023 Environment and Climate Change Canada // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/TMB/ll_weibull.hpp b/src/TMB/ll_weibull.hpp index 1dfa4863e..389a610b3 100644 --- a/src/TMB/ll_weibull.hpp +++ b/src/TMB/ll_weibull.hpp @@ -1,4 +1,4 @@ -// Copyright 2021 Environment and Climate Change Canada +// Copyright 2023 Environment and Climate Change Canada // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/TMB/ssdtools_TMBExports.cpp b/src/TMB/ssdtools_TMBExports.cpp index 30841ab6d..55a364251 100644 --- a/src/TMB/ssdtools_TMBExports.cpp +++ b/src/TMB/ssdtools_TMBExports.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Environment and Climate Change Canada +// Copyright 2023 Environment and Climate Change Canada // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/testthat.R b/tests/testthat.R index 9e569cd25..de53fd628 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-augment.R b/tests/testthat/test-augment.R index 414d2b159..7fc19a28c 100644 --- a/tests/testthat/test-augment.R +++ b/tests/testthat/test-augment.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-autoplot.R b/tests/testthat/test-autoplot.R index fdd11987f..aee1ec9b6 100644 --- a/tests/testthat/test-autoplot.R +++ b/tests/testthat/test-autoplot.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-burrIII3.R b/tests/testthat/test-burrIII3.R index da975ed21..ce0fa6c71 100644 --- a/tests/testthat/test-burrIII3.R +++ b/tests/testthat/test-burrIII3.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-censor.R b/tests/testthat/test-censor.R index e879706b8..b877da807 100644 --- a/tests/testthat/test-censor.R +++ b/tests/testthat/test-censor.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-censored.R b/tests/testthat/test-censored.R index 7b21912cb..a80c14e29 100644 --- a/tests/testthat/test-censored.R +++ b/tests/testthat/test-censored.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-coef.R b/tests/testthat/test-coef.R index 55d40a334..19a206578 100644 --- a/tests/testthat/test-coef.R +++ b/tests/testthat/test-coef.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-data.R b/tests/testthat/test-data.R index 184aa0f80..b93d4da14 100644 --- a/tests/testthat/test-data.R +++ b/tests/testthat/test-data.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-dists.R b/tests/testthat/test-dists.R index a3b4e7380..4a652c26f 100644 --- a/tests/testthat/test-dists.R +++ b/tests/testthat/test-dists.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-estimates.R b/tests/testthat/test-estimates.R index bf5292b43..832aa0921 100644 --- a/tests/testthat/test-estimates.R +++ b/tests/testthat/test-estimates.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-exposure.R b/tests/testthat/test-exposure.R index 6f1b8c101..f1d31a104 100644 --- a/tests/testthat/test-exposure.R +++ b/tests/testthat/test-exposure.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-fit-burrlioz.R b/tests/testthat/test-fit-burrlioz.R index e6d8d23f8..3fe80fb66 100644 --- a/tests/testthat/test-fit-burrlioz.R +++ b/tests/testthat/test-fit-burrlioz.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-fit.R b/tests/testthat/test-fit.R index 63c391dae..d8570da92 100644 --- a/tests/testthat/test-fit.R +++ b/tests/testthat/test-fit.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-gamma.R b/tests/testthat/test-gamma.R index a2fd64ff8..808dfd722 100644 --- a/tests/testthat/test-gamma.R +++ b/tests/testthat/test-gamma.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-ggplot.R b/tests/testthat/test-ggplot.R index e44118078..66ea284e2 100644 --- a/tests/testthat/test-ggplot.R +++ b/tests/testthat/test-ggplot.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-gof.R b/tests/testthat/test-gof.R index 831250d1d..7f53cf1c0 100644 --- a/tests/testthat/test-gof.R +++ b/tests/testthat/test-gof.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-gompertz.R b/tests/testthat/test-gompertz.R index 0b36e147e..c5ca308af 100644 --- a/tests/testthat/test-gompertz.R +++ b/tests/testthat/test-gompertz.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-hc-burrlioz.R b/tests/testthat/test-hc-burrlioz.R index 47332bd94..bfc9dc738 100644 --- a/tests/testthat/test-hc-burrlioz.R +++ b/tests/testthat/test-hc-burrlioz.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-hc-root.R b/tests/testthat/test-hc-root.R index 5499ec940..f5b898c22 100644 --- a/tests/testthat/test-hc-root.R +++ b/tests/testthat/test-hc-root.R @@ -14,29 +14,24 @@ # limitations under the License. test_that("hc root lnorm", { - skip_on_os("linux") # FIXME fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") set.seed(102) hc_dist <- ssd_hc(fits, average = FALSE) hc_average <- ssd_hc(fits, average = TRUE) hc_root <- ssd_hc(fits, average = TRUE, root = TRUE) - expect_identical(hc_average$est, hc_dist$est) - expect_identical(hc_average$est, hc_dist$est) + expect_identical(hc_dist$est, hc_average$est) expect_equal(hc_root, hc_average) - expect_equal(hc_root$est, 1.68117483988121, tolerance = 1e-6) - + testthat::expect_snapshot({ hc_root }) }) test_that("hc root all", { - skip_on_os("linux") fits <- ssd_fit_dists(ssddata::ccme_boron) set.seed(102) hc_average <- ssd_hc(fits, average = TRUE) hc_root <- ssd_hc(fits, average = TRUE, root = TRUE) - expect_equal(hc_root, hc_average, tolerance = 1e-1) expect_equal(hc_average$est, 1.24151700389853) expect_equal(hc_root$est, 1.25678623624403) testthat::expect_snapshot({ diff --git a/tests/testthat/test-hc.R b/tests/testthat/test-hc.R index eeb12b320..feba033e9 100644 --- a/tests/testthat/test-hc.R +++ b/tests/testthat/test-hc.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ # limitations under the License. test_that("hc", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron) set.seed(102) hc <- ssd_hc(fits, ci = TRUE, nboot = 10, average = FALSE) @@ -22,17 +22,17 @@ test_that("hc", { }) test_that("ssd_hc list must be named", { - skip_on_os("linux") # FIXME + chk::expect_chk_error(ssd_hc(list())) }) test_that("ssd_hc list names must be unique", { - skip_on_os("linux") # FIXME + chk::expect_chk_error(ssd_hc(list("lnorm" = NULL, "lnorm" = NULL))) }) test_that("ssd_hc list handles zero length list", { - skip_on_os("linux") # FIXME + hc <- ssd_hc(structure(list(), .Names = character(0))) expect_s3_class(hc, "tbl_df") expect_identical(colnames(hc), c("dist", "percent", "est", "se", "lcl", "ucl", "wt", "nboot", "pboot")) @@ -42,7 +42,7 @@ test_that("ssd_hc list handles zero length list", { }) test_that("ssd_hc list works null values handles zero length list", { - skip_on_os("linux") # FIXME + hc <- ssd_hc(list("lnorm" = NULL)) expect_s3_class(hc, "tbl_df") expect_identical(colnames(hc), c("dist", "percent", "est", "se", "lcl", "ucl", "wt", "nboot", "pboot")) @@ -53,7 +53,7 @@ test_that("ssd_hc list works null values handles zero length list", { }) test_that("ssd_hc list works multiple percent values", { - skip_on_os("linux") # FIXME + hc <- ssd_hc(list("lnorm" = NULL), percent = c(1, 99)) expect_s3_class(hc, "tbl_df") expect_identical(colnames(hc), c("dist", "percent", "est", "se", "lcl", "ucl", "wt", "nboot", "pboot")) @@ -64,7 +64,7 @@ test_that("ssd_hc list works multiple percent values", { }) test_that("ssd_hc list works specified values", { - skip_on_os("linux") # FIXME + hc <- ssd_hc(list("lnorm" = list(meanlog = 2, sdlog = 2))) expect_s3_class(hc, "tbl_df") expect_identical(colnames(hc), c("dist", "percent", "est", "se", "lcl", "ucl", "wt", "nboot", "pboot")) @@ -76,7 +76,7 @@ test_that("ssd_hc list works specified values", { }) test_that("ssd_hc list works multiple NULL distributions", { - skip_on_os("linux") # FIXME + hc <- ssd_hc(list("lnorm" = NULL, "llogis" = NULL)) expect_s3_class(hc, "tbl_df") expect_identical(colnames(hc), c("dist", "percent", "est", "se", "lcl", "ucl", "wt", "nboot", "pboot")) @@ -87,7 +87,7 @@ test_that("ssd_hc list works multiple NULL distributions", { }) test_that("ssd_hc list works multiple NULL distributions with multiple percent", { - skip_on_os("linux") # FIXME + hc <- ssd_hc(list("lnorm" = NULL, "llogis" = NULL), percent = c(1, 99)) expect_s3_class(hc, "tbl_df") expect_identical(colnames(hc), c("dist", "percent", "est", "se", "lcl", "ucl", "wt", "nboot", "pboot")) @@ -98,7 +98,7 @@ test_that("ssd_hc list works multiple NULL distributions with multiple percent", }) test_that("ssd_hc fitdists works zero length percent", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hc <- ssd_hc(fits, numeric(0)) @@ -111,7 +111,7 @@ test_that("ssd_hc fitdists works zero length percent", { }) test_that("ssd_hc fitdists works NA percent", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hc <- ssd_hc(fits, NA_real_) @@ -120,7 +120,7 @@ test_that("ssd_hc fitdists works NA percent", { }) test_that("ssd_hc fitdists works 0 percent", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hc <- ssd_hc(fits, 0) @@ -129,7 +129,7 @@ test_that("ssd_hc fitdists works 0 percent", { }) test_that("ssd_hc fitdists works 100 percent", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hc <- ssd_hc(fits, 100) @@ -138,7 +138,7 @@ test_that("ssd_hc fitdists works 100 percent", { }) test_that("ssd_hc fitdists works multiple percents", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hc <- ssd_hc(fits, percent = c(1, 99)) @@ -147,7 +147,7 @@ test_that("ssd_hc fitdists works multiple percents", { }) test_that("ssd_hc fitdists averages", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron) hc <- ssd_hc(fits) expect_s3_class(hc, "tbl_df") @@ -155,7 +155,7 @@ test_that("ssd_hc fitdists averages", { }) test_that("ssd_hc fitdists correctly averages", { - skip_on_os("linux") # FIXME + library(ssdtools) library(ssddata) library(testthat) @@ -168,7 +168,7 @@ test_that("ssd_hc fitdists correctly averages", { }) test_that("ssd_hc fitdists averages single dist by multiple percent", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hc <- ssd_hc(fits, average = TRUE, percent = 1:99) @@ -177,7 +177,7 @@ test_that("ssd_hc fitdists averages single dist by multiple percent", { }) test_that("ssd_hc fitdists not average single dist by multiple percent gives whole numeric", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hc <- ssd_hc(fits, average = FALSE, percent = 1:99) @@ -186,7 +186,7 @@ test_that("ssd_hc fitdists not average single dist by multiple percent gives who }) test_that("ssd_hc fitdists not average", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron) hc <- ssd_hc(fits, average = FALSE) expect_s3_class(hc, "tbl_df") @@ -194,7 +194,7 @@ test_that("ssd_hc fitdists not average", { }) test_that("ssd_hc fitdists correct for rescaling", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron) fits_rescale <- ssd_fit_dists(ssddata::ccme_boron, rescale = TRUE) hc <- ssd_hc(fits) @@ -203,7 +203,7 @@ test_that("ssd_hc fitdists correct for rescaling", { }) test_that("ssd_hc fitdists cis", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") set.seed(102) @@ -214,7 +214,7 @@ test_that("ssd_hc fitdists cis", { }) test_that("ssd_hc fitdists cis level = 0.8", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") set.seed(102) @@ -225,7 +225,7 @@ test_that("ssd_hc fitdists cis level = 0.8", { }) test_that("ssd_hc doesn't calculate cis with inconsistent censoring", { - skip_on_os("linux") # FIXME + data <- ssddata::ccme_boron data$Conc2 <- data$Conc data$Conc[1] <- 0.5 @@ -245,7 +245,7 @@ test_that("ssd_hc doesn't calculate cis with inconsistent censoring", { }) test_that("ssd_hc works with fully left censored data", { - skip_on_os("linux") # FIXME + data <- ssddata::ccme_boron data$Conc2 <- data$Conc data$Conc <- 0 @@ -256,7 +256,7 @@ test_that("ssd_hc works with fully left censored data", { }) test_that("ssd_hc not work partially censored even if all same left", { - skip_on_os("linux") # FIXME + data <- ssddata::ccme_boron data$Conc2 <- data$Conc data$Conc <- 0.1 @@ -269,7 +269,7 @@ test_that("ssd_hc not work partially censored even if all same left", { }) test_that("ssd_hc doesn't works with inconsisently censored data", { - skip_on_os("linux") # FIXME + data <- ssddata::ccme_boron data$Conc2 <- data$Conc data$Conc <- 0 @@ -283,7 +283,7 @@ test_that("ssd_hc doesn't works with inconsisently censored data", { }) test_that("ssd_hc same with equally weighted data", { - skip_on_os("linux") # FIXME + data <- ssddata::ccme_boron data$Weight <- rep(1, nrow(data)) fits <- ssd_fit_dists(data, weight = "Weight", dists = "lnorm") @@ -298,7 +298,7 @@ test_that("ssd_hc same with equally weighted data", { }) test_that("ssd_hc calculates cis with equally weighted data", { - skip_on_os("linux") # FIXME + data <- ssddata::ccme_boron data$Weight <- rep(2, nrow(data)) fits <- ssd_fit_dists(data, weight = "Weight", dists = "lnorm") @@ -308,7 +308,7 @@ test_that("ssd_hc calculates cis with equally weighted data", { }) test_that("ssd_hc calculates cis in parallel but one distribution", { - skip_on_os("linux") # FIXME + local_multisession() data <- ssddata::ccme_boron fits <- ssd_fit_dists(data, dists = "lnorm") @@ -318,7 +318,7 @@ test_that("ssd_hc calculates cis in parallel but one distribution", { }) test_that("ssd_hc calculates cis with two distributions", { - skip_on_os("linux") # FIXME + data <- ssddata::ccme_boron fits <- ssd_fit_dists(data, dists = c("lnorm", "llogis")) set.seed(10) @@ -327,7 +327,7 @@ test_that("ssd_hc calculates cis with two distributions", { }) test_that("ssd_hc calculates cis in parallel with two distributions", { - skip_on_os("linux") # FIXME + local_multisession() data <- ssddata::ccme_boron fits <- ssd_fit_dists(data, dists = c("lnorm", "llogis")) @@ -337,7 +337,7 @@ test_that("ssd_hc calculates cis in parallel with two distributions", { }) test_that("ssd_hc doesn't calculate cis with unequally weighted data", { - skip_on_os("linux") # FIXME + data <- ssddata::ccme_boron data$Weight <- rep(1, nrow(data)) data$Weight[1] <- 2 @@ -350,7 +350,7 @@ test_that("ssd_hc doesn't calculate cis with unequally weighted data", { }) test_that("ssd_hc no effect with higher weight one distribution", { - skip_on_os("linux") # FIXME + data <- ssddata::ccme_boron data$Weight <- rep(1, nrow(data)) fits <- ssd_fit_dists(data, weight = "Weight", dists = "lnorm") @@ -364,7 +364,7 @@ test_that("ssd_hc no effect with higher weight one distribution", { }) test_that("ssd_hc effect with higher weight two distributions", { - skip_on_os("linux") # FIXME + data <- ssddata::ccme_boron data$Weight <- rep(1, nrow(data)) fits <- ssd_fit_dists(data, weight = "Weight", dists = c("lnorm", "llogis")) @@ -381,7 +381,7 @@ test_that("ssd_hc effect with higher weight two distributions", { }) test_that("ssd_hc cis with non-convergence", { - skip_on_os("linux") # FIXME + set.seed(99) conc <- ssd_rlnorm_lnorm(100, meanlog1 = 0, meanlog2 = 1, sdlog1 = 1 / 10, sdlog2 = 1 / 10, pmix = 0.2) data <- data.frame(Conc = conc) @@ -399,7 +399,7 @@ test_that("ssd_hc cis with non-convergence", { }) test_that("ssd_hc cis with error", { - skip_on_os("linux") # FIXME + set.seed(99) conc <- ssd_rlnorm_lnorm(30, meanlog1 = 0, meanlog2 = 1, sdlog1 = 1 / 10, sdlog2 = 1 / 10, pmix = 0.2) data <- data.frame(Conc = conc) @@ -419,7 +419,7 @@ test_that("ssd_hc cis with error", { }) test_that("ssd_hc cis with error and multiple dists", { - skip_on_os("linux") # FIXME + set.seed(99) conc <- ssd_rlnorm_lnorm(30, meanlog1 = 0, meanlog2 = 1, sdlog1 = 1 / 10, sdlog2 = 1 / 10, pmix = 0.2) data <- data.frame(Conc = conc) @@ -443,7 +443,7 @@ test_that("ssd_hc cis with error and multiple dists", { }) test_that("ssd_hc with 1 bootstrap", { - skip_on_os("linux") # FIXME + fit <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") set.seed(10) hc <- ssd_hc(fit, ci = TRUE, nboot = 1) @@ -451,7 +451,7 @@ test_that("ssd_hc with 1 bootstrap", { }) test_that("ssd_hc comparable parametric and non-parametric big sample size", { - skip_on_os("linux") # FIXME + set.seed(99) data <- data.frame(Conc = ssd_rlnorm(10000, 2, 1)) fit <- ssd_fit_dists(data, dists = "lnorm") @@ -468,7 +468,7 @@ test_that("ssd_hc comparable parametric and non-parametric big sample size", { }) test_that("ssd_hc parametric and non-parametric small sample size", { - skip_on_os("linux") # FIXME + fit <- ssd_fit_burrlioz(ssddata::ccme_boron) set.seed(47) hc_para_small <- ssd_hc(fit, nboot = 10, ci = TRUE) @@ -479,7 +479,7 @@ test_that("ssd_hc parametric and non-parametric small sample size", { }) test_that("ssd_hc_burrlioz gets estimates with invpareto", { - skip_on_os("linux") # FIXME + fit <- ssd_fit_burrlioz(ssddata::ccme_boron) set.seed(47) hc_boron <- ssd_hc(fit, nboot = 10, ci = TRUE, min_pboot = 0) @@ -487,7 +487,7 @@ test_that("ssd_hc_burrlioz gets estimates with invpareto", { }) test_that("ssd_hc_burrlioz gets estimates with burrIII3", { - skip_on_os("linux") # FIXME + set.seed(99) data <- data.frame(Conc = ssd_rburrIII3(30)) fit <- ssd_fit_burrlioz(data) @@ -501,7 +501,7 @@ test_that("ssd_hc_burrlioz gets estimates with burrIII3", { }) test_that("ssd_hc_burrlioz gets estimates with burrIII3 parametric", { - skip_on_os("linux") # FIXME + set.seed(99) data <- data.frame(Conc = ssd_rburrIII3(30)) fit <- ssd_fit_burrlioz(data) @@ -518,7 +518,7 @@ test_that("ssd_hc_burrlioz gets estimates with burrIII3 parametric", { }) test_that("ssd_hc passing all boots ccme_chloride lnorm_lnorm", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_chloride, min_pmix = 0.0001, at_boundary_ok = TRUE, dists = c("lnorm_lnorm", "llogis_llogis") diff --git a/tests/testthat/test-hp-root.R b/tests/testthat/test-hp-root.R index 6b274eacb..47d86ffc5 100644 --- a/tests/testthat/test-hp-root.R +++ b/tests/testthat/test-hp-root.R @@ -14,7 +14,7 @@ # limitations under the License. test_that("hp root lnorm", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") set.seed(102) hp_dist <- ssd_hp(fits, average = FALSE) diff --git a/tests/testthat/test-hp.R b/tests/testthat/test-hp.R index 06570aecc..e322d6901 100644 --- a/tests/testthat/test-hp.R +++ b/tests/testthat/test-hp.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ # limitations under the License. test_that("hp", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron) set.seed(102) @@ -23,7 +23,7 @@ test_that("hp", { }) test_that("hp fitdists works with zero length conc", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hp <- ssd_hp(fits, numeric(0)) @@ -37,7 +37,7 @@ test_that("hp fitdists works with zero length conc", { }) test_that("hp fitdist works with missing conc", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hp <- ssd_hp(fits, NA_real_) @@ -46,7 +46,7 @@ test_that("hp fitdist works with missing conc", { }) test_that("hp fitdist works with 0 conc", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hp <- ssd_hp(fits, 0) @@ -55,7 +55,7 @@ test_that("hp fitdist works with 0 conc", { }) test_that("hp fitdist works with negative conc", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hp <- ssd_hp(fits, -1) @@ -64,7 +64,7 @@ test_that("hp fitdist works with negative conc", { }) test_that("hp fitdist works with -Inf conc", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hp <- ssd_hp(fits, -Inf) @@ -73,7 +73,7 @@ test_that("hp fitdist works with -Inf conc", { }) test_that("hp fitdist works with Inf conc", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hp <- ssd_hp(fits, Inf) @@ -82,7 +82,7 @@ test_that("hp fitdist works with Inf conc", { }) test_that("hp fitdists works reasonable conc", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hp <- ssd_hp(fits, 1) @@ -91,7 +91,7 @@ test_that("hp fitdists works reasonable conc", { }) test_that("hp fitdists works with multiple concs", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hp <- ssd_hp(fits, c(2.5, 1)) @@ -100,7 +100,7 @@ test_that("hp fitdists works with multiple concs", { }) test_that("hp fitdists works with cis", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") set.seed(10) @@ -110,7 +110,7 @@ test_that("hp fitdists works with cis", { }) test_that("hp fitdists works with multiple dists", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron) hp <- ssd_hp(fits, 1) @@ -119,7 +119,7 @@ test_that("hp fitdists works with multiple dists", { }) test_that("hp fitdists works not average multiple dists", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron) hp <- ssd_hp(fits, 1, average = FALSE) @@ -128,7 +128,7 @@ test_that("hp fitdists works not average multiple dists", { }) test_that("hp fitdists gives different answer with model averaging as hc not same for either", { - skip_on_os("linux") # FIXME + library(ssdtools) library(ssddata) library(testthat) @@ -145,7 +145,7 @@ test_that("hp fitdists gives different answer with model averaging as hc not sam }) test_that("ssd_hp fitdists correct for rescaling", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron) fits_rescale <- ssd_fit_dists(ssddata::ccme_boron, rescale = TRUE) hp <- ssd_hp(fits, 1) @@ -154,7 +154,7 @@ test_that("ssd_hp fitdists correct for rescaling", { }) test_that("hp fitdists with no fitdists", { - skip_on_os("linux") # FIXME + x <- list() class(x) <- c("fitdists") hp <- ssd_hp(x, 1) @@ -163,7 +163,7 @@ test_that("hp fitdists with no fitdists", { }) test_that("ssd_hp doesn't calculate cis with inconsistent censoring", { - skip_on_os("linux") # FIXME + data <- ssddata::ccme_boron data$Conc2 <- data$Conc data$Conc[1] <- 0.5 @@ -183,7 +183,7 @@ test_that("ssd_hp doesn't calculate cis with inconsistent censoring", { }) test_that("ssd_hp same with equally weighted data", { - skip_on_os("linux") # FIXME + data <- ssddata::ccme_boron data$Weight <- rep(1, nrow(data)) fits <- ssd_fit_dists(data, weight = "Weight", dists = "lnorm") @@ -198,7 +198,7 @@ test_that("ssd_hp same with equally weighted data", { }) test_that("ssd_hp calculates cis with equally weighted data", { - skip_on_os("linux") # FIXME + data <- ssddata::ccme_boron data$Weight <- rep(2, nrow(data)) fits <- ssd_fit_dists(data, weight = "Weight", dists = "lnorm") @@ -208,7 +208,7 @@ test_that("ssd_hp calculates cis with equally weighted data", { }) test_that("ssd_hp calculates cis with two distributions", { - skip_on_os("linux") # FIXME + data <- ssddata::ccme_boron fits <- ssd_fit_dists(data, dists = c("lnorm", "llogis")) set.seed(10) @@ -217,7 +217,7 @@ test_that("ssd_hp calculates cis with two distributions", { }) test_that("ssd_hp calculates cis in parallel but one distribution", { - skip_on_os("linux") # FIXME + local_multisession() data <- ssddata::ccme_boron fits <- ssd_fit_dists(data, dists = "lnorm") @@ -227,7 +227,7 @@ test_that("ssd_hp calculates cis in parallel but one distribution", { }) test_that("ssd_hp calculates cis in parallel with two distributions", { - skip_on_os("linux") # FIXME + local_multisession() data <- ssddata::ccme_boron fits <- ssd_fit_dists(data, dists = c("lnorm", "llogis")) @@ -237,7 +237,7 @@ test_that("ssd_hp calculates cis in parallel with two distributions", { }) test_that("ssd_hp doesn't calculate cis with unequally weighted data", { - skip_on_os("linux") # FIXME + data <- ssddata::ccme_boron data$Weight <- rep(1, nrow(data)) data$Weight[1] <- 2 @@ -250,7 +250,7 @@ test_that("ssd_hp doesn't calculate cis with unequally weighted data", { }) test_that("ssd_hp no effect with higher weight one distribution", { - skip_on_os("linux") # FIXME + data <- ssddata::ccme_boron data$Weight <- rep(1, nrow(data)) fits <- ssd_fit_dists(data, weight = "Weight", dists = "lnorm") @@ -264,7 +264,7 @@ test_that("ssd_hp no effect with higher weight one distribution", { }) test_that("ssd_hp effect with higher weight two distributions", { - skip_on_os("linux") # FIXME + data <- ssddata::ccme_boron data$Weight <- rep(1, nrow(data)) fits <- ssd_fit_dists(data, weight = "Weight", dists = c("lnorm", "llogis")) @@ -281,7 +281,7 @@ test_that("ssd_hp effect with higher weight two distributions", { }) test_that("ssd_hp cis with non-convergence", { - skip_on_os("linux") # FIXME + set.seed(99) conc <- ssd_rlnorm_lnorm(100, meanlog1 = 0, meanlog2 = 1, sdlog1 = 1 / 10, sdlog2 = 1 / 10, pmix = 0.2) data <- data.frame(Conc = conc) @@ -299,7 +299,7 @@ test_that("ssd_hp cis with non-convergence", { }) test_that("ssd_hp cis with error", { - skip_on_os("linux") # FIXME + set.seed(99) conc <- ssd_rlnorm_lnorm(30, meanlog1 = 0, meanlog2 = 1, sdlog1 = 1 / 10, sdlog2 = 1 / 10, pmix = 0.2) data <- data.frame(Conc = conc) @@ -319,7 +319,7 @@ test_that("ssd_hp cis with error", { }) test_that("ssd_hp cis with error and multiple dists", { - skip_on_os("linux") # FIXME + set.seed(99) conc <- ssd_rlnorm_lnorm(30, meanlog1 = 0, meanlog2 = 1, sdlog1 = 1 / 10, sdlog2 = 1 / 10, pmix = 0.2) data <- data.frame(Conc = conc) @@ -346,7 +346,7 @@ test_that("ssd_hp cis with error and multiple dists", { }) test_that("ssd_hp with 1 bootstrap", { - skip_on_os("linux") # FIXME + fit <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") set.seed(10) hp <- ssd_hp(fit, 1, ci = TRUE, nboot = 1) @@ -354,7 +354,7 @@ test_that("ssd_hp with 1 bootstrap", { }) test_that("ssd_hp comparable parametric and non-parametric big sample size", { - skip_on_os("linux") # FIXME + set.seed(99) data <- data.frame(Conc = ssd_rlnorm(10000, 2, 1)) fit <- ssd_fit_dists(data, dists = "lnorm") diff --git a/tests/testthat/test-invpareto.R b/tests/testthat/test-invpareto.R index d9a540180..86d309f7d 100644 --- a/tests/testthat/test-invpareto.R +++ b/tests/testthat/test-invpareto.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-is.R b/tests/testthat/test-is.R index e5d6e6681..6dc0fa874 100644 --- a/tests/testthat/test-is.R +++ b/tests/testthat/test-is.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-lgumbel.R b/tests/testthat/test-lgumbel.R index ef14fbd06..309d63c1a 100644 --- a/tests/testthat/test-lgumbel.R +++ b/tests/testthat/test-lgumbel.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-llogis-llogis.R b/tests/testthat/test-llogis-llogis.R index 3d89d0613..82cf26dc4 100644 --- a/tests/testthat/test-llogis-llogis.R +++ b/tests/testthat/test-llogis-llogis.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-llogis.R b/tests/testthat/test-llogis.R index 3ca3649d4..18622255f 100644 --- a/tests/testthat/test-llogis.R +++ b/tests/testthat/test-llogis.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-lnorm-lnorm.R b/tests/testthat/test-lnorm-lnorm.R index a234984df..b9f6efacf 100644 --- a/tests/testthat/test-lnorm-lnorm.R +++ b/tests/testthat/test-lnorm-lnorm.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-lnorm.R b/tests/testthat/test-lnorm.R index ff90a8aa5..597d0ae43 100644 --- a/tests/testthat/test-lnorm.R +++ b/tests/testthat/test-lnorm.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-logLik.R b/tests/testthat/test-logLik.R index 833f7b479..64218aa76 100644 --- a/tests/testthat/test-logLik.R +++ b/tests/testthat/test-logLik.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-match-moments.R b/tests/testthat/test-match-moments.R index 38945806e..bf4c313c0 100644 --- a/tests/testthat/test-match-moments.R +++ b/tests/testthat/test-match-moments.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-nobs.R b/tests/testthat/test-nobs.R index 1f1fd761c..160cb5ce7 100644 --- a/tests/testthat/test-nobs.R +++ b/tests/testthat/test-nobs.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-npars.R b/tests/testthat/test-npars.R index 35454e8b5..bfaccb867 100644 --- a/tests/testthat/test-npars.R +++ b/tests/testthat/test-npars.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-plot-cdf.R b/tests/testthat/test-plot-cdf.R index 89d7e6124..9a2a35980 100644 --- a/tests/testthat/test-plot-cdf.R +++ b/tests/testthat/test-plot-cdf.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-plot-cf.R b/tests/testthat/test-plot-cf.R index 3b78fb4fc..52afb2faa 100644 --- a/tests/testthat/test-plot-cf.R +++ b/tests/testthat/test-plot-cf.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-plot-data.R b/tests/testthat/test-plot-data.R index 531c9d7a0..515bca52c 100644 --- a/tests/testthat/test-plot-data.R +++ b/tests/testthat/test-plot-data.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-predict.R b/tests/testthat/test-predict.R index 0119a42e9..7116b7af4 100644 --- a/tests/testthat/test-predict.R +++ b/tests/testthat/test-predict.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ # limitations under the License. test_that("predict", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron) @@ -23,7 +23,7 @@ test_that("predict", { }) test_that("predict cis", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron) @@ -34,7 +34,7 @@ test_that("predict cis", { }) test_that("predict not average", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_dists(ssddata::ccme_boron) expect_true(is.fitdists(fits)) @@ -45,7 +45,7 @@ test_that("predict not average", { }) test_that("predict cis fitburrlioz", { - skip_on_os("linux") # FIXME + fits <- ssd_fit_burrlioz(ssddata::ccme_boron) expect_true(is.fitdists(fits)) diff --git a/tests/testthat/test-schwarz-tillmans.R b/tests/testthat/test-schwarz-tillmans.R index 22343a9c3..70e9d108b 100644 --- a/tests/testthat/test-schwarz-tillmans.R +++ b/tests/testthat/test-schwarz-tillmans.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-ssd-data.R b/tests/testthat/test-ssd-data.R index 4fff097f3..14db1253e 100644 --- a/tests/testthat/test-ssd-data.R +++ b/tests/testthat/test-ssd-data.R @@ -1,4 +1,4 @@ -# Copyright 2021 Environment and Climate Change Canada +# Copyright 2023 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-ssd-plot.R b/tests/testthat/test-ssd-plot.R index e05e7a97a..25243e164 100644 --- a/tests/testthat/test-ssd-plot.R +++ b/tests/testthat/test-ssd-plot.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-subset.R b/tests/testthat/test-subset.R index 0693c379c..6824859e2 100644 --- a/tests/testthat/test-subset.R +++ b/tests/testthat/test-subset.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-tidy.R b/tests/testthat/test-tidy.R index 88ff04f7c..d0e376900 100644 --- a/tests/testthat/test-tidy.R +++ b/tests/testthat/test-tidy.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-utils.R b/tests/testthat/test-utils.R index e8a863985..e026d86ea 100644 --- a/tests/testthat/test-utils.R +++ b/tests/testthat/test-utils.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/testthat/test-weibull.R b/tests/testthat/test-weibull.R index d11dc1c99..7e86e8d39 100644 --- a/tests/testthat/test-weibull.R +++ b/tests/testthat/test-weibull.R @@ -1,4 +1,4 @@ -# Copyright 2021 Province of British Columbia +# Copyright 2023 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/vignettes/distributions.Rmd b/vignettes/distributions.Rmd index 16c4d4ddf..e7c5aea81 100644 --- a/vignettes/distributions.Rmd +++ b/vignettes/distributions.Rmd @@ -75,13 +75,10 @@ ssd_plot_cdf(ssd_match_moments(dists = ssd_dists_all(), meanlog = 2, sdlog = 2)) scale_color_ssd() ``` ------ +## References -Creative Commons Licence
ssdtools by the Province of British Columbia - is licensed under a -Creative Commons Attribution 4.0 International License. +
-## References +```{r, results = "asis", echo = FALSE} +cat(licensing_md()) +``` diff --git a/vignettes/exposure-plots.Rmd b/vignettes/exposure-plots.Rmd index 60248c99a..14663f9fe 100644 --- a/vignettes/exposure-plots.Rmd +++ b/vignettes/exposure-plots.Rmd @@ -90,15 +90,10 @@ gp + Other embellishments can be added in a similar fashion using the features of [*ggplot*](https://ggplot2.tidyverse.org) and are not discussed here. ------ - -Creative Commons Licence
ssdtools by the Province of British Columbia - is licensed under a -Creative Commons Attribution 4.0 International License. - ## References -Verdonck, F. A., Aldenberg, T. , Jaworska, J. and Vanrolleghem, P. A. (2003), Limitations of current risk characterization methods in probabilistic environmental risk assessment. Environmental Toxicology and Chemistry, 22: 2209-2213. https://doi.org/10.1897/02-435 +
+ +```{r, results = "asis", echo = FALSE} +cat(licensing_md()) +``` diff --git a/vignettes/faqs.Rmd b/vignettes/faqs.Rmd index de808a5ce..864b01c76 100644 --- a/vignettes/faqs.Rmd +++ b/vignettes/faqs.Rmd @@ -57,11 +57,6 @@ ssd_plot(ccme_boron, boron_preds, xlab = "Concentration (mg/L)", ci = FALSE) + facet_wrap(~Group) ``` ------ - -Creative Commons Licence
ssdtools by the Province of British Columbia - is licensed under a -Creative Commons Attribution 4.0 International License. +```{r, results = "asis", echo = FALSE} +cat(licensing_md()) +``` diff --git a/vignettes/small-sample-bias-ref.Rmd b/vignettes/small-sample-bias-ref.Rmd index 7c6ad5ecd..06dd1a6a3 100644 --- a/vignettes/small-sample-bias-ref.Rmd +++ b/vignettes/small-sample-bias-ref.Rmd @@ -19,11 +19,6 @@ knitr::opts_chunk$set( The small sample bias in estimates vignette is available as a [pdf](https://github.com/bcgov/ssdtools/blob/master/vignettes/small-sample-bias.pdf). ------ - -Creative Commons Licence
ssdtools by the Province of British Columbia - is licensed under a -Creative Commons Attribution 4.0 International License. +```{r, results = "asis", echo = FALSE} +cat(ssdtools::licensing_md()) +``` diff --git a/vignettes/ssdtools.Rmd b/vignettes/ssdtools.Rmd index 1395c4e01..5c556addb 100644 --- a/vignettes/ssdtools.Rmd +++ b/vignettes/ssdtools.Rmd @@ -287,7 +287,10 @@ ggsave("file_name.png", dpi = 600) ------ - ## References +
+ +```{r, results = "asis", echo = FALSE} +cat(licensing_md()) +``` diff --git a/vignettestatic/small-sample-bias.Rmd b/vignettestatic/small-sample-bias.Rmd index d42a5bddb..8d04ea012 100644 --- a/vignettestatic/small-sample-bias.Rmd +++ b/vignettestatic/small-sample-bias.Rmd @@ -797,11 +797,6 @@ dependent on the chosen distribution; (c) there is no data available to support even moderate extrapolation to tail proportions. Higher certainty in the estimates can only be obtained by increasing sample sizes. ------ - -Creative Commons Licence
ssdtools by the Province of British Columbia - is licensed under a -Creative Commons Attribution 4.0 International License. +```{r, results = "asis", echo = FALSE} +cat(licensing_md()) +```