Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c421b68
update range_shape1 and range_shape2 parameter descriptions
joethorley May 24, 2026
7d316df
Remove small sample bias vignette (moved to ssdvignettes)
joethorley Jun 7, 2026
7be8958
Merge pull request #158 from poissonconsulting/joethorley/issue157
joethorley Jun 7, 2026
2d9a48b
Fix weighted starting values, duplicate ssd_elgumbel, deprecated ggpl…
joethorley Jun 7, 2026
7024c7e
Move dplyr to Imports, drop plyr and unused Suggests
joethorley Jun 7, 2026
dc3192b
Remove repeated 33-parameter blocks in multi.R
joethorley Jun 7, 2026
a07b9f0
Replace eval(parse()) metaprogramming with direct dispatch
joethorley Jun 7, 2026
3832d18
rbuildignore .claude
joethorley Jun 7, 2026
a2a42a2
Deduplicate proportion handling, tighten validation and messages
joethorley Jun 7, 2026
39425f5
Remove dead parameters and tidy minor cleanups
joethorley Jun 7, 2026
3cbae2a
Merge pull request #161 from poissonconsulting/joethorley/refactor-multi
joethorley Jun 7, 2026
f40ad45
Merge pull request #163 from poissonconsulting/joethorley/validation-…
joethorley Jun 7, 2026
9858907
Merge pull request #162 from poissonconsulting/joethorley/refactor-ev…
joethorley Jun 7, 2026
62233ac
Use .env$nboot in hcp_combine_samples to avoid data-mask column
joethorley Jun 7, 2026
20e7da6
Update weighted-fit snapshots for corrected starting values
joethorley Jun 7, 2026
e23a7be
Merge pull request #159 from poissonconsulting/dev
joethorley Jun 7, 2026
372f027
Merge pull request #160 from poissonconsulting/joethorley/code-review…
joethorley Jun 7, 2026
dcb8118
Merge pull request #164 from poissonconsulting/joethorley/dead-code-c…
joethorley Jun 7, 2026
739052c
update pngs
joethorley Jun 7, 2026
7958859
update roxygen
joethorley Jun 7, 2026
e1c1e6b
roxygen
joethorley Jun 7, 2026
151da5a
ensure VGAM loaded for tests
joethorley Jun 7, 2026
a5074db
ci: Fix codecov
krlmlr Jun 8, 2026
9108626
Merge branch 'main' into b-covr
krlmlr Jun 8, 2026
8bd9081
Merge pull request #168 from krlmlr/b-covr
joethorley Jun 8, 2026
998ce60
Remove unused abind dependency
joethorley Jun 15, 2026
fd39c3a
Merge pull request #171 from poissonconsulting/remove-unused-abind
joethorley Jun 15, 2026
0e9253d
fix ssddata added medium column
joethorley Jul 12, 2026
73a9f3b
Seed arithmetic_samples ci test for reproducibility
joethorley Jul 12, 2026
2508914
Install ssddata from open-AIMS/ssddata on CI
joethorley Jul 12, 2026
26afd47
Merge pull request #172 from poissonconsulting/joethorley/fix-arithme…
joethorley Jul 12, 2026
37c9137
Add CODEOWNERS naming @joethorley
joethorley Jul 12, 2026
8900584
Merge pull request #174 from poissonconsulting/add-codeowners
joethorley Jul 12, 2026
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
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@
.devcontainer
^\.vscode$
^[.]?air[.]toml$
^\.claude$
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @joethorley
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v5
- uses: codecov/codecov-action@v7
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
Expand Down
18 changes: 7 additions & 11 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ BugReports: https://github.com/bcgov/ssdtools/issues
Depends:
R (>= 4.1)
Imports:
abind,
chk,
dplyr,
furrr,
generics,
ggplot2,
Expand All @@ -61,7 +61,6 @@ Imports:
grid,
lifecycle,
parallel,
plyr,
purrr,
Rcpp,
readr,
Expand All @@ -73,37 +72,34 @@ Imports:
tibble,
TMB,
universals,
utils
utils,
VGAM
Suggests:
actuar,
covr,
dplyr,
EnvStats,
extraDistr,
fitdistrplus,
grDevices,
knitr,
latex2exp,
magrittr,
mle.tools,
patchwork,
reshape2,
rmarkdown,
testthat (>= 3.0.0),
tidyr,
tidyselect,
tinytex,
VGAM,
withr
LinkingTo:
Rcpp,
RcppEigen,
TMB
VignetteBuilder:
VignetteBuilder:
knitr
Remotes:
open-AIMS/ssddata
Config/roxygen2/version: 8.0.0.9000
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-US
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.3.9000
140 changes: 84 additions & 56 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -166,63 +166,91 @@ import(chk)
import(ggplot2)
import(rlang)
importFrom(Rcpp,sourceCpp)
importFrom(TMB,MakeADFun)
importFrom(TMB,sdreport)
importFrom(abind,abind)
importFrom(furrr,furrr_options)
importFrom(furrr,future_map)
importFrom(generics,augment)
importFrom(generics,glance)
importFrom(generics,tidy)
importFrom(ggplot2,autoplot)
importFrom(ggplot2,sym)
importFrom(ggplot2,waiver)
importFrom(TMB,
MakeADFun,
sdreport
)
importFrom(furrr,
furrr_options,
future_map
)
importFrom(generics,
augment,
glance,
tidy
)
importFrom(ggplot2,
autoplot,
sym,
waiver
)
importFrom(glue,glue)
importFrom(goftest,ad.test)
importFrom(goftest,cvm.test)
importFrom(graphics,par)
importFrom(graphics,plot)
importFrom(graphics,title)
importFrom(grid,gList)
importFrom(grid,gTree)
importFrom(grid,gpar)
importFrom(grid,grobName)
importFrom(grid,polygonGrob)
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,label_percent)
importFrom(scales,manual_pal)
importFrom(scales,trans_breaks)
importFrom(goftest,
ad.test,
cvm.test
)
importFrom(graphics,
par,
plot,
title
)
importFrom(grid,
gList,
gTree,
gpar,
grobName,
polygonGrob,
segmentsGrob
)
importFrom(lifecycle,
deprecate_soft,
deprecate_stop,
deprecate_warn,
deprecated,
expect_defunct,
expect_deprecated
)
importFrom(parallel,
nextRNGStream,
nextRNGSubStream
)
importFrom(purrr,
list_assign,
transpose
)
importFrom(scales,
label_percent,
manual_pal,
trans_breaks
)
importFrom(ssddata,gm_mean)
importFrom(stats,coef)
importFrom(stats,complete.cases)
importFrom(stats,ks.test)
importFrom(stats,logLik)
importFrom(stats,nobs)
importFrom(stats,optim)
importFrom(stats,plogis)
importFrom(stats,predict)
importFrom(stats,qlogis)
importFrom(stats,runif)
importFrom(stats,sd)
importFrom(stats,setNames)
importFrom(stats,uniroot)
importFrom(stats,weighted.mean)
importFrom(stats,
coef,
complete.cases,
ks.test,
logLik,
nobs,
optim,
plogis,
predict,
qlogis,
runif,
sd,
setNames,
uniroot,
weighted.mean
)
importFrom(stringr,str_order)
importFrom(tibble,as_tibble)
importFrom(tibble,tibble)
importFrom(universals,estimates)
importFrom(universals,npars)
importFrom(utils,capture.output)
importFrom(utils,relist)
importFrom(tibble,
as_tibble,
tibble
)
importFrom(universals,
estimates,
npars
)
importFrom(utils,
capture.output,
relist
)
useDynLib(ssdtools, .registration=TRUE); useDynLib(ssdtools_TMBExports)
7 changes: 1 addition & 6 deletions R/boot.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ sample_nonparametric <- function(data) {
data[sample(nrow(data), replace = TRUE), ]
}

sample_parametric <- function(
dist,
args = args,
weighted = weighted,
censoring = censoring
) {
sample_parametric <- function(dist, args, weighted, censoring) {
what <- paste0("ssd_r", dist)
args$chk <- FALSE
sample <- do.call(what, args)
Expand Down
2 changes: 1 addition & 1 deletion R/burrrIII3.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ sburrIII3 <- function(data, pars = NULL) {
list(log_scale = 0, log_shape1 = 0, log_shape2 = 0)
}

bburrIII3 <- function(x, range_shape1, range_shape2, ...) {
bburrIII3 <- function(range_shape1, range_shape2, ...) {
log_range_shape1 <- log(range_shape1)
log_range_shape2 <- log(range_shape2)
list(
Expand Down
1 change: 0 additions & 1 deletion R/devtools-helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ release_questions <- function() {
"Have you fixed all the `FIXME`s?",
"Have you run `data-raw/data-raw.R`?",
"Have you tested using `ssdtests` package?",
"Have you run `vignettestatic/small-sample-bias.Rmd`?",
"Have you confirmed all images in .Rmd files have alternative text defined using the `fig.alt` argument?",
"Have you confirmed updated Apache 2.0 license at the top of all code files?",
"Have you confirmed update Creative Commons license for all non-code files?"
Expand Down
4 changes: 3 additions & 1 deletion R/estimates.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ estimates.fitdists <- function(x, all_estimates = FALSE, ...) {
}

.relist_estimates <- function(x) {
list <- relist(x, skeleton = emulti_ssd())
skeleton <- emulti_ssd()
x <- unlist(x)[names(unlist(skeleton))]
list <- relist(x, skeleton = skeleton)
purrr::map(list, function(x) as.list(unlist(x)))
}
13 changes: 6 additions & 7 deletions R/ggproto.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ StatSsdpoint <- ggproto(
"StatSsdpoint",
Stat,
required_aes = "x",
default_aes = aes(y = ..density..),
default_aes = aes(y = after_stat(density)),
compute_panel = function(data, scales) {
data$density <- ssd_ecd(data$x)
data
Expand All @@ -40,7 +40,7 @@ StatSsdsegment <- ggproto(
"StatSsdsegment",
Stat,
required_aes = c("x", "xend"),
default_aes = aes(y = ..density.., yend = ..density..),
default_aes = aes(y = after_stat(density), yend = after_stat(density)),
compute_panel = function(data, scales) {
data$density <- ssd_ecd(rowMeans(data[c("x", "xend")], na.rm = TRUE))
data
Expand Down Expand Up @@ -114,18 +114,17 @@ GeomXribbon <- ggproto(
# Check that aesthetics are constant
aes <- unique(data[c("colour", "fill", "linewidth", "linetype", "alpha")])
if (nrow(aes) > 1) {
err("Aesthetics can not vary with a ribbon.")
err("Aesthetics cannot vary with a ribbon.")
}
aes <- as.list(aes)

missing_pos <- !complete.cases(data[c("y", "xmin", "xmax")])
ids <- cumsum(missing_pos) + 1
ids[missing_pos] <- NA

positions <- plyr::summarise(
data,
y = c(y, rev(y)),
x = c(xmax, rev(xmin)),
positions <- data.frame(
y = c(data$y, rev(data$y)),
x = c(data$xmax, rev(data$xmin)),
id = c(ids, rev(ids))
)
munched <- coord_munch(coord, positions, panel_params)
Expand Down
1 change: 0 additions & 1 deletion R/gompertz.R
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ rgompertz <- function(n, llocation = 0, lshape = 0) {
}

sgompertz <- function(data, pars = NULL) {
rlang::check_installed("VGAM")
x <- mean_weighted_values(data)

if (!is.null(pars)) {
Expand Down
Loading
Loading