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

version 2.2 #396

Merged
merged 74 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
4f20679
dev/ version
joethorley Oct 21, 2024
7934876
add missing dois
joethorley Nov 20, 2024
89fca04
upadated docs
dunkenwg Dec 2, 2024
19fb347
Merge branch 'bcgov:main' into main
joethorley Dec 3, 2024
d9b3aa0
add small-sample-bias back in
joethorley Dec 3, 2024
f2212fd
update .gitignore
joethorley Dec 3, 2024
fdd30c6
try fixing log-normal math
joethorley Dec 3, 2024
38be175
playing with log-normal dist
joethorley Dec 3, 2024
373bfed
distributions
joethorley Dec 3, 2024
edf1f21
log-normal
joethorley Dec 3, 2024
a2ec4be
merge main
joethorley Dec 5, 2024
e70d2d8
Merge pull request #392 from poissonconsulting/main
joethorley Dec 5, 2024
ba30c68
add xlimits argument to ssd_plot to set x-axis limits (passed to scal…
sebdalgarno Dec 6, 2024
92b12c7
add ssd_label_comma_hc label function to offset hc value (appending \n)
sebdalgarno Dec 7, 2024
95de5d2
add ability in plot_coord_scale to append hc value to xbreaks and off…
sebdalgarno Dec 7, 2024
3186e9b
add hc_value param for plot_coord_scale, update documentation on acce…
sebdalgarno Dec 7, 2024
2c86c6d
document
sebdalgarno Dec 7, 2024
65ad89e
add two new tests for ssd_plot with hc value
sebdalgarno Dec 7, 2024
9975017
update ssd_plot and plot_data snapshots, hc value now included + with…
sebdalgarno Dec 7, 2024
2fbbd76
add ggtext dependency
sebdalgarno Dec 7, 2024
e7fd79e
add text_size and label_size arguments, soft-deprecate size
sebdalgarno Dec 7, 2024
1c63fc5
fix example, add markdown for new line and bold label
sebdalgarno Dec 7, 2024
d92ba25
soft-deprecate size for label_size, add option to change text size, f…
sebdalgarno Dec 7, 2024
9d88dbd
document
sebdalgarno Dec 7, 2024
3f72201
add snap for label and text size, review/update snapshots with bold h…
sebdalgarno Dec 7, 2024
3503606
forgot to add checks for new xlimits arg
sebdalgarno Dec 7, 2024
da95eec
fix xlimits check to allow null
sebdalgarno Dec 7, 2024
e7315de
better documentation for ssd_label_comma_hc
sebdalgarno Dec 7, 2024
f03c89a
add ss_label_comma_hc to _pkgdown.yml index
sebdalgarno Dec 7, 2024
df9fdf6
Added fig alt text, addresses #182
Dec 9, 2024
6ae6245
Merge pull request #394 from beckyfisher/joss-paper-rf
joethorley Dec 10, 2024
757573f
Merge pull request #108 from poissonconsulting/predict_plot
joethorley Dec 10, 2024
f5a837b
Merge pull request #395 from poissonconsulting/main
joethorley Dec 10, 2024
2c5a79a
build site
joethorley Dec 10, 2024
01470fc
add pkgdown::build_reference() for checking.
joethorley Dec 10, 2024
aaa2f87
fix vignette article
joethorley Dec 10, 2024
276187c
update plot.
joethorley Dec 10, 2024
2aed846
add ecotox as alternative source of environmental toxicity data
joethorley Dec 10, 2024
94effc5
add example for scale_fill_ssd() and expand the description for discr…
joethorley Dec 10, 2024
5e294b3
update NEWS to clarify that xx refers to family of functions
joethorley Dec 10, 2024
5f44821
clarify reasons for change to TMB
joethorley Dec 10, 2024
2ea7641
clarify reasons for change to TMB
joethorley Dec 10, 2024
4f36f3d
Merge branch 'joss-paper' of github.com:bcgov/ssdtools into joss-paper
joethorley Dec 10, 2024
bf55c68
update news tmb
joethorley Dec 10, 2024
334d4b8
does not directly affect
joethorley Dec 10, 2024
9cb7603
Readded FAQ vignette
joethorley Dec 10, 2024
6825a15
add description to censor data
joethorley Dec 10, 2024
89e9a34
update paper to clarify relationship between multi_est and ci_method
joethorley Dec 10, 2024
2c06345
remove argument name without context.
joethorley Dec 10, 2024
62f7ca6
update deprecation information
joethorley Dec 10, 2024
c2c7902
fledge: Bump version to 2.2.0
joethorley Dec 10, 2024
2fadc0d
update news file
joethorley Dec 10, 2024
d534336
spelling
joethorley Dec 10, 2024
cdc2d0a
getting ready for release
joethorley Dec 10, 2024
0c56c8d
faqs fig.alt
joethorley Dec 10, 2024
1c0ae4a
update small sample bias pdf
joethorley Dec 10, 2024
7ac705c
simplify text distributions
joethorley Dec 10, 2024
c7c7988
another paper tweak
joethorley Dec 10, 2024
c24c5c8
original
joethorley Dec 10, 2024
591027d
non-parametric
joethorley Dec 10, 2024
f6047c2
ssd_label_comma_hc
joethorley Dec 10, 2024
e24cb92
update data and plot
joethorley Dec 11, 2024
daac36f
Turned off x-axis minor breaks for all plots (for consistency) as HC …
joethorley Dec 11, 2024
15a9c7b
typos
joethorley Dec 12, 2024
cb88bf0
fun to fun_ssd
joethorley Dec 12, 2024
9a94e6f
unnecessary file
joethorley Dec 12, 2024
2c9454d
theme classic
joethorley Dec 12, 2024
f62fe06
Rstudio added ProjectId to proj file.
joethorley Dec 17, 2024
1f0b3ca
added `ssd_dists_shiny()`
joethorley Dec 19, 2024
ac7c21a
add shinyssdtools to wordlist
joethorley Jan 2, 2025
63b9d9b
spelling
joethorley Jan 2, 2025
0c54cab
update description
joethorley Jan 2, 2025
2c52000
update pkgdown url
joethorley Jan 3, 2025
ffb1792
update readme
joethorley Jan 4, 2025
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
Prev Previous commit
Next Next commit
add xlimits argument to ssd_plot to set x-axis limits (passed to scal…
…e_x_continuous(limits))
  • Loading branch information
sebdalgarno committed Dec 6, 2024
commit ba30c6801dc8934f1f68b9c432b63c1cdd818eab
4 changes: 4 additions & 0 deletions R/params.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@
#' - `NULL` for no breaks
#' - `waiver()` for the default breaks
#' - A numeric vector of positions
#' @param xlimits The x-axis limits as one of:
#' - `NULL` to use the default scale range
#' - A numeric vector of length two providing the limits.
#' Use NA to refer to the existing minimum or maximum limits.
#' @param xintercept The x-value for the intersect
#' @param xlab A string of the x-axis label.
#' @param yintercept The y-value for the intersect.
Expand Down
10 changes: 6 additions & 4 deletions R/ssd-plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#' @export
ggplot2::waiver

plot_coord_scale <- function(data, xlab, ylab, trans, big.mark, suffix, xbreaks = waiver()) {
plot_coord_scale <- function(data, xlab, ylab, trans, big.mark, suffix, xbreaks = waiver(), xlimits = NULL) {
chk_string(xlab)
chk_string(ylab)

Expand All @@ -30,7 +30,8 @@ plot_coord_scale <- function(data, xlab, ylab, trans, big.mark, suffix, xbreaks
coord_trans(x = trans),
scale_x_continuous(xlab,
breaks = xbreaks,
labels = ssd_label_comma(big.mark = big.mark)
labels = ssd_label_comma(big.mark = big.mark),
limits = xlimits
),
scale_y_continuous(ylab,
labels = label_percent(suffix = suffix), limits = c(0, 1),
Expand All @@ -57,7 +58,8 @@ ssd_plot <- function(data, pred, left = "Conc", right = left, ...,
shift_x = 3, add_x = 0,
bounds = c(left = 1, right = 1),
big.mark = ",", suffix = "%",
trans = "log10", xbreaks = waiver()) {
trans = "log10", xbreaks = waiver(),
xlimits = NULL) {
.chk_data(data, left, right, weight = NULL, missing = TRUE)
chk_unused(...)
chk_null_or(label, vld = vld_string)
Expand Down Expand Up @@ -162,7 +164,7 @@ ssd_plot <- function(data, pred, left = "Conc", right = left, ...,

gp <- gp + plot_coord_scale(data,
xlab = xlab, ylab = ylab, big.mark = big.mark, suffix = suffix,
trans = trans, xbreaks = xbreaks
trans = trans, xbreaks = xbreaks, xlimits = xlimits
)

if (!is.null(label)) {
Expand Down
7 changes: 7 additions & 0 deletions man/params.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion man/ssd_plot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions tests/testthat/test-ssd-plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,8 @@ test_that("ssd_plot fills in missing order", {
"missing_order"
)
})

test_that("ssd_plot xlims", {
expect_snapshot_plot(ssd_plot(ssddata::ccme_boron, boron_pred, xlimits = c(NA, 10000)), "boron_limits")
})