Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Penultimate PR before version 2 #381

Merged
merged 86 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
1c7daa0
ingore scripts
beckyfisher Jul 29, 2024
e726e74
usethis::use_readme_rmd()
joethorley Aug 15, 2024
54a7bba
usethis::use_pkgdown_github_pages()
joethorley Aug 15, 2024
0e596e0
update git ignore
joethorley Aug 15, 2024
0e28cba
pkgdown
joethorley Aug 15, 2024
0ec1dad
usethis::use_tidy_style()
joethorley Aug 15, 2024
73208c8
urlchecker::url_check()
joethorley Aug 15, 2024
d9b58dc
usethis::use_testthat(3)
joethorley Aug 15, 2024
c1bf059
Remove check environments section from cran-comments.md
joethorley Aug 15, 2024
d5abf12
Use lifecycle instead of artisanal deprecation messages
joethorley Aug 15, 2024
97f1489
usethis:::use_codecov_badge("poissonconsulting/ssdtools")
joethorley Aug 15, 2024
e541d20
usethis::use_tidy_coc()
joethorley Aug 15, 2024
c38246c
Use pak::pak("poissonconsulting/ssdtools") in README
joethorley Aug 15, 2024
7bb297c
usethis::use_tidy_dependencies() without cli
joethorley Aug 15, 2024
cc67796
edit readme
joethorley Aug 15, 2024
e120423
usethis::use_tidy_description()
joethorley Aug 15, 2024
a21e22e
usethis::use_tidy_github_actions()
joethorley Aug 15, 2024
05a2d9f
check dev
joethorley Aug 15, 2024
0e5e4fe
to dev
joethorley Aug 15, 2024
76c27ee
ssd min pmix
joethorley Aug 15, 2024
2494531
remove '` pkgdown
joethorley Aug 15, 2024
b8f43e1
& to && in if statements
joethorley Aug 15, 2024
f2c3d73
Merge branch 'dev' into upkeep-2024-08
joethorley Aug 15, 2024
9ccb596
Merge pull request #70 from poissonconsulting/upkeep-2024-08
joethorley Aug 15, 2024
7752fed
stable badge
joethorley Aug 15, 2024
c8b1075
Merge branch 'dev' of github.com:poissonconsulting/ssdtools into dev
joethorley Aug 15, 2024
cf82177
test bootstrap with censored data
joethorley Aug 15, 2024
18b951e
test is censored
joethorley Aug 16, 2024
44b83fa
test summary censored
joethorley Aug 16, 2024
ac10bef
remove redundant value
joethorley Aug 16, 2024
763abae
test partial left full censored
joethorley Aug 16, 2024
ebe750f
simplify censor
joethorley Aug 16, 2024
16fad1b
refactor censoring
joethorley Aug 16, 2024
9c85971
- Added `ssd_censor_data()`.
joethorley Aug 17, 2024
2d90026
more censoring tests
joethorley Aug 19, 2024
e52f3fb
- Deprecate `ssd_wqg_bc()` and `ssd_wqg_burrlioz()`.
joethorley Aug 19, 2024
24dab69
move to deprecated functions
joethorley Aug 19, 2024
9d42693
add `ssd_censor_data()` to _pkgdown.yml
joethorley Aug 19, 2024
3c8be89
dist_data example fixed
joethorley Aug 19, 2024
1acea3a
adding old small sample size bias
joethorley Aug 19, 2024
3a5bee5
updating small sample bias
joethorley Aug 19, 2024
73882ce
update devtools helpers
joethorley Aug 19, 2024
0d92828
updating code
joethorley Aug 19, 2024
8dcda58
update small sample bias
joethorley Aug 20, 2024
02408d7
Merge pull request #74 from poissonconsulting/b-censorplot
joethorley Aug 20, 2024
6b0754b
Merge branch 'dev' into deprecate-wqg
joethorley Aug 20, 2024
54ffefa
Merge pull request #75 from poissonconsulting/deprecate-wqg
joethorley Aug 20, 2024
0a29a51
Merge branch 'dev' into f-vignettes
joethorley Aug 20, 2024
5d43390
Merge pull request #79 from poissonconsulting/f-vignettes
joethorley Aug 20, 2024
b301d52
remove small sample bias
joethorley Aug 20, 2024
49f4618
- The optim argument `pgtol` is set to 1e-5 if not specified via the …
joethorley Aug 21, 2024
38bfc27
- Moved pearson1000 to ssdtests.
joethorley Aug 21, 2024
7b47638
update boron pred and dist_data
joethorley Aug 22, 2024
2701e57
move small sample bias.Rmd to ssdtests
joethorley Aug 22, 2024
b8ec945
- Remove `pgtol` argument.
joethorley Aug 22, 2024
fe51d06
- Increase starting deviation in lnorm parameters from 0.1% to 1%.
joethorley Sep 10, 2024
19564f9
update readme instructions
joethorley Sep 16, 2024
d7b1019
Merge branch 'dev' of github.com:open-AIMS/ssdtools into dev
beckyfisher Sep 17, 2024
33d8754
Added section on minimum sample size recommendations
beckyfisher Sep 18, 2024
f55ba69
Added examples for plotting individual cdfs, average cdf and both
beckyfisher Sep 19, 2024
090da67
- Set default `at_boundary_ok = TRUE` for lnorm_lnorm mixture converg…
joethorley Sep 19, 2024
7e05726
Bump version to 1.0.6.9017
joethorley Sep 19, 2024
88d194c
Merge pull request #86 from open-AIMS/min_sample_size
joethorley Sep 19, 2024
7462b5a
artifact v4
joethorley Sep 20, 2024
3f2d70e
delete html
joethorley Sep 20, 2024
08dc8c1
move gompertz problem data to ssdtests
joethorley Sep 23, 2024
e8ac421
remove gompertz problem
joethorley Sep 23, 2024
763fa04
- Switch computable from TRUE to FALSE.
joethorley Sep 23, 2024
d187237
- Only implement non-parametric bootstrap for censored data.
joethorley Sep 23, 2024
bcdf395
break tidy_stable_computable tests into two parts with lnorm-lnorm se…
joethorley Sep 23, 2024
c082cee
update paper
joethorley Sep 23, 2024
9d09306
move unstable lnorm_lnorm with censored data to ssdtests
joethorley Sep 23, 2024
bd75072
distributions to ``
joethorley Sep 23, 2024
39db642
update ref urls
joethorley Sep 23, 2024
ed949d1
vignette add faq latex
joethorley Sep 23, 2024
bb45e18
update namespace
joethorley Sep 23, 2024
87556ed
- `comma_signif()` added `big.mark = ","` and "..." must be unused.
joethorley Sep 24, 2024
7023aa1
update package down params
joethorley Sep 24, 2024
6a8f426
- Added `big.mark = ","` to `ssd_plot()`.
joethorley Sep 24, 2024
fbe58dd
- Added `big.mark = ","` to `ssd_plot_data()`.
joethorley Sep 24, 2024
3ea9f61
test bigmark for functions
joethorley Sep 24, 2024
d76c9d3
- Added `suffix = %` argument to plotting functions.
joethorley Sep 24, 2024
143a479
- Added `ssd_label_comma()`.
joethorley Sep 24, 2024
4a1c7c1
- Update deprecation.
joethorley Sep 24, 2024
06f1c1f
moved vgam to suggests
joethorley Sep 24, 2024
fa11272
Bump version to 1.0.6.9018
joethorley Sep 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md → .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ representative at an online or offline event.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at .github/.
reported to the community leaders responsible for enforcement at [email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help

#
on:
push:
branches: [main, dev]
branches: [main, master]
pull_request:
branches: [main, dev]
branches: [main, master, dev]

name: R-CMD-check

permissions: read-all

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
Expand All @@ -23,19 +25,20 @@ jobs:

- {os: windows-latest, r: 'release'}
# use 4.1 to check with rtools40's older compiler
- {os: windows-latest, r: '4.1'}
- {os: windows-latest, r: 'oldrel-3'}

- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'oldrel-2'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'oldrel-2'}
- {os: ubuntu-latest, r: 'oldrel-3'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -53,3 +56,4 @@ jobs:
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
2 changes: 1 addition & 1 deletion .github/workflows/paper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
journal: joss
paper-path: paper/paper.md
- name: Upload
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: paper
path: paper/paper.pdf
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: main
branches: [main, master]
pull_request:
branches: main
branches: [main, master, dev]
release:
types: [published]
workflow_dispatch:

name: pkgdown
name: pkgdown.yaml

permissions: read-all

jobs:
pkgdown:
Expand All @@ -22,7 +24,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -41,7 +43,7 @@ jobs:

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
Expand Down
31 changes: 21 additions & 10 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,60 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: main
branches: [main, master]
pull_request:
branches: main
branches: [main, master, dev]

name: test-coverage
name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
runs-on: macos-latest
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: |
covr::codecov(
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
11 changes: 5 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@

*.html

docs/
inst/docs/
inst/doc
paper/paper.pdf
scripts/boron_samples1
scripts/checks.md
/docs/
/inst/docs/
/paper/paper.pdf
/scripts/boron_samples1
/scripts/checks.md
21 changes: 10 additions & 11 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ssdtools
Title: Species Sensitivity Distributions
Version: 1.0.6.9016
Version: 1.0.6.9018
Authors@R: c(
person("Joe", "Thorley", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-7683-4592")),
Expand All @@ -15,9 +15,7 @@ Authors@R: c(
person("Doug", "Spry", role = "ctb"),
person("Rick", "van Dam", role = "ctb"),
person("Graham", "Batley", role = "ctb"),
person("Yulia", "Cuthbertson", role = "ctb"),
person("Tony", "Bigwood", role = "ctb"),
person("Michael", "Antenucci", role = "ctb"),
person("Ali", "Azizishirazi", role = "ctb"),
person("Nadine", "Hussein", , "[email protected]", role = "ctb",
comment = c(ORCID = "0000-0003-4470-8361")),
Expand All @@ -38,9 +36,9 @@ Description: Species sensitivity distributions are cumulative probability
different species as described by Posthuma et al.(2001)
<isbn:9781566705783>. The ssdtools package uses Maximum Likelihood to
fit distributions such as the gamma, log-logistic, log-normal and
log-normal log-normal mixture. Multiple distributions can
be averaged using Akaike Information Criteria. Confidence intervals
on hazard concentrations and proportions are produced by parametric
log-normal log-normal mixture. Multiple distributions can be averaged
using Akaike Information Criteria. Confidence intervals on hazard
concentrations and proportions are produced by parametric
bootstrapping.
License: Apache License (== 2.0) | file LICENSE
URL: https://github.com/bcgov/ssdtools, https://bcgov.github.io/ssdtools/
Expand All @@ -53,6 +51,7 @@ Imports:
furrr,
generics,
ggplot2,
glue,
goftest,
graphics,
grid,
Expand All @@ -61,6 +60,7 @@ Imports:
plyr,
purrr,
Rcpp,
rlang,
scales,
ssddata,
stats,
Expand All @@ -69,7 +69,7 @@ Imports:
TMB,
universals,
utils,
VGAM
withr
Suggests:
actuar,
covr,
Expand All @@ -80,22 +80,21 @@ Suggests:
fitdistrplus,
foreach,
future,
glue,
grDevices,
knitr,
latex2exp,
magrittr,
mle.tools,
patchwork,
R.rsp,
readr,
reshape2,
rlang,
rmarkdown,
testthat,
testthat (>= 3.0.0),
tidyr,
tidyselect,
tinytex,
withr
VGAM
LinkingTo:
Rcpp,
RcppEigen,
Expand Down
12 changes: 8 additions & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export(is_censored)
export(logLik)
export(nobs)
export(npars)
export(params)
export(pgompertz)
export(plgumbel)
export(plot)
Expand All @@ -68,6 +69,7 @@ export(rgompertz)
export(rlgumbel)
export(scale_color_ssd)
export(scale_colour_ssd)
export(ssd_censor_data)
export(ssd_data)
export(ssd_dists)
export(ssd_dists_all)
Expand Down Expand Up @@ -96,6 +98,7 @@ export(ssd_hc_burrlioz)
export(ssd_hp)
export(ssd_hp_bcanz)
export(ssd_is_censored)
export(ssd_label_comma)
export(ssd_licensing_md)
export(ssd_match_moments)
export(ssd_min_pmix)
Expand Down Expand Up @@ -145,11 +148,10 @@ export(tidy)
export(waiver)
import(chk)
import(ggplot2)
import(rlang)
importFrom(Rcpp,sourceCpp)
importFrom(TMB,MakeADFun)
importFrom(TMB,sdreport)
importFrom(VGAM,gompertz)
importFrom(VGAM,vglm)
importFrom(abind,abind)
importFrom(furrr,furrr_options)
importFrom(furrr,future_map)
Expand All @@ -159,6 +161,7 @@ importFrom(generics,tidy)
importFrom(ggplot2,autoplot)
importFrom(ggplot2,sym)
importFrom(ggplot2,waiver)
importFrom(glue,glue)
importFrom(goftest,ad.test)
importFrom(goftest,cvm.test)
importFrom(graphics,par)
Expand All @@ -173,15 +176,16 @@ importFrom(grid,segmentsGrob)
importFrom(lifecycle,deprecate_soft)
importFrom(lifecycle,deprecate_stop)
importFrom(lifecycle,deprecate_warn)
importFrom(lifecycle,deprecated)
importFrom(lifecycle,expect_defunct)
importFrom(lifecycle,expect_deprecated)
importFrom(parallel,nextRNGStream)
importFrom(parallel,nextRNGSubStream)
importFrom(plyr,summarise)
importFrom(purrr,list_assign)
importFrom(purrr,transpose)
importFrom(scales,comma)
importFrom(scales,label_percent)
importFrom(scales,manual_pal)
importFrom(scales,percent)
importFrom(scales,trans_breaks)
importFrom(ssddata,gm_mean)
importFrom(stats,coef)
Expand Down
18 changes: 13 additions & 5 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- NEWS.md is maintained by https://fledge.cynkra.com, contributors should not edit this file -->

# ssdtools 1.0.6.9016
# ssdtools 1.0.6.9018

## Additions

Expand All @@ -11,14 +11,20 @@
- `samples` argument to include bootstrap samples as list of numeric vector(s).
- `save_to` argument to specify a directory in which to save the bootstrap datasets as csv files and parameter estimates as rds files. The files are named `data_000000001_xx.csv` and `estimates_000000001_xx.rds` etc where `xx` is the distribution. The parent data set and estimates are named `boot_000000000_xx.csv` and `estimates_000000000_xx.csv`.
- Added `ssd_hp_bcanz()` and `ssd_hp.fitburrlioz()` function to get hazard proportions.
- Added `ssd_label_comma()` for x-axis labels.
- Added `trans = "log10"` and `add_x = 0` arguments to `ssd_plot()` and `ssd_plot_data()`.
- Added `ssd_pmulti()`, `ssd_qmulti()` and `ssd_rmulti()` for combined mixture distributions.
- Added `ssd_exx()` functions to get default parameter estimates for distributions.
- Added `ssd_censor_data()` to censor data.
- Added David Fox and Rebecca Fisher as co-authors.
- Added `npars` argument to `ssd_dists_bcanz()`.
- Added `big.mark = ","` for x-axis labels and `suffix = "%"` to y-axis labels to plotting functions.

## Modifications

- Only non-parametric bootstrap for censored data.
- Changed `at_boundary_ok = TRUE` to ensure `lnorm_lnorm` mixture distribution included.
- Changed `computable = TRUE` to as not required for bootstrapping.
- Changed to `min_pboot = 0.95` for all functions.
- Changed `min_pmix = 0` to `min_pmix = ssd_min_pmix(nrow(data))` to by default
give set min_pmix to be `0.1` or `3/nrow(data)` if greater to improve convergence of mixture models.
Expand All @@ -43,11 +49,13 @@ give set min_pmix to be `0.1` or `3/nrow(data)` if greater to improve convergenc

## Deprecation

- Soft-deprecated `comma_signif()`.
- Soft-deprecated argument `percent = 5` for `proportion = 0.05` for `ssd_hc()` and `predict()`.
- `is_censored()`, `ssd_plot_cf()` and `comma_signif(...)` now warn deprecated unconditionally.
- `plot.fitdists()` now defunct.
- Removed defunct `ssd_cfplot()`
- `is_censored()`, `plot.fitdists()`, `ssd_plot_cf()` `geom_ssd()`, `stat_ssd()`, `xgompertz()`, `xlgumbel`, `ssd_hc_burrlioz()` now defunct.
- Deprecated `ssd_wqg_bc()` and `ssd_wqg_burrlioz()`. (#75).
- Deprecated `ssd_fit_bcanz()` and `ssd_hp_bcanz()`.
- Removed `ccme_data` and `ccme_boron` data set.
- Removed `pearson1000` data set (now in `ssdtests` data).

# ssdtools 1.0.6

Expand Down Expand Up @@ -91,7 +99,7 @@ ssdtools version 1.0.0 is the first major release of `ssdtools` with some import

## Fitting

An important change to the functionality of `ssd_fit_dists()` was to switch from model fitting using [`fitdistrplus`](https://github.com/aursiber/fitdistrplus) to [`TMB`](https://github.com/kaskr/adcomp) which has resulted in improved handling of censored data.
An important change to the functionality of `ssd_fit_dists()` was to switch from model fitting using [`fitdistrplus`](https://github.com/lbbe-software/fitdistrplus) to [`TMB`](https://github.com/kaskr/adcomp) which has resulted in improved handling of censored data.
Although it was hoped that model fitting would be faster this is currently not the case.

As a result of the change the `fitdists` objects returned by `ssd_fit_dists()` from previous versions of `ssdtools` are not compatible with the major release and should be regenerated.
Expand Down
Loading
Loading