Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 5 additions & 4 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,24 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
NOT_CRAN: "true"

steps:
- uses: actions/checkout@c0a81a463886bb75afe234e07a9fd5bb79219196

- uses: r-lib/actions/setup-pandoc@52330cc136b963487918a8867f948ddf954e9e63
- uses: r-lib/actions/setup-pandoc@e0a5ffdf0b121aa1c2112f65e54b642a81dc29d9

- uses: r-lib/actions/setup-r@756399d909bf9c180bbdafe8025f794f51f2da02
- uses: r-lib/actions/setup-r@12d8dd416fec5aaa60f2f54609b713b2ec031a94
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@52330cc136b963487918a8867f948ddf954e9e63
- uses: r-lib/actions/setup-r-dependencies@813ef1cb62cf0b4b51a044419024c37807fa8095
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@52330cc136b963487918a8867f948ddf954e9e63
- uses: r-lib/actions/check-r-package@15dc53465b2f37cf7fc85ed97ae3e28f8e210955
with:
upload-snapshots: true
8 changes: 4 additions & 4 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ jobs:
steps:
- uses: actions/checkout@c0a81a463886bb75afe234e07a9fd5bb79219196

- uses: r-lib/actions/setup-pandoc@52330cc136b963487918a8867f948ddf954e9e63
- uses: r-lib/actions/setup-pandoc@e0a5ffdf0b121aa1c2112f65e54b642a81dc29d9

- uses: r-lib/actions/setup-r@52330cc136b963487918a8867f948ddf954e9e63
- uses: r-lib/actions/setup-r@12d8dd416fec5aaa60f2f54609b713b2ec031a94
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@52330cc136b963487918a8867f948ddf954e9e63
- uses: r-lib/actions/setup-r-dependencies@813ef1cb62cf0b4b51a044419024c37807fa8095
with:
extra-packages: any::pkgdown, local::.
needs: website
Expand All @@ -48,7 +48,7 @@ jobs:
file.copy(from = "./public/articles/logo.png",to = "./public/reference/logo.png")
shell: Rscript {0}
- name: Upload artifact
uses: actions/upload-pages-artifact@64bcae551a7b18bcb9a09042ddf1960979799187
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b
with:
path: ./public
# Deployment job
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ name: test-coverage
jobs:
test-coverage:
runs-on: macOS-latest
env: NOT_CRAN: "true"
steps:
- uses: actions/checkout@c0a81a463886bb75afe234e07a9fd5bb79219196

- uses: r-lib/actions/setup-r@756399d909bf9c180bbdafe8025f794f51f2da02
- uses: r-lib/actions/setup-r@12d8dd416fec5aaa60f2f54609b713b2ec031a94

- uses: r-lib/actions/setup-pandoc@52330cc136b963487918a8867f948ddf954e9e63
- uses: r-lib/actions/setup-pandoc@e0a5ffdf0b121aa1c2112f65e54b642a81dc29d9

- uses: r-lib/actions/setup-r-dependencies@756399d909bf9c180bbdafe8025f794f51f2da02
- uses: r-lib/actions/setup-r-dependencies@813ef1cb62cf0b4b51a044419024c37807fa8095
with:
extra-packages: any::rcmdcheck
needs: check
Expand Down
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: toxEval
Type: Package
Title: Exploring Biological Relevance of Environmental Chemistry Observations
Version: 1.4.0
Version: 1.4.1
Authors@R: c(person("Laura", "DeCicco",
role = c("aut","cre"),
email = "[email protected]",
Expand Down Expand Up @@ -47,7 +47,8 @@ Imports:
readxl,
tools,
shinyAce,
shinycssloaders
shinycssloaders,
utils
Suggests:
rmarkdown,
testthat,
Expand All @@ -60,4 +61,4 @@ BugReports: https://github.com/DOI-USGS/toxEval/issues
VignetteBuilder: knitr
BuildVignettes: true
LazyLoad: yes
RoxygenNote: 7.3.2
RoxygenNote: 7.3.3
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
toxEval 1.4.1
===========
* Fixed a test breaking due to ggplot2 update.

toxEval 1.4.0
===========
* Switched to version 4.1 of the ToxCast database
Expand Down
35 changes: 24 additions & 11 deletions R/plot_chemical_boxplots.R
Original file line number Diff line number Diff line change
Expand Up @@ -242,18 +242,31 @@ plot_chemical_boxplots <- function(chemical_summary, ...,
)

if (isTRUE(y_label == "")) {
toxPlot_All <- toxPlot_All +
scale_y_log10(
labels = fancyNumbers,
breaks = pretty_logs_new
) +
theme(axis.title.x = element_blank())
if(utils::packageVersion("ggplot2") == "4.0.0"){
toxPlot_All <- toxPlot_All +
scale_y_log10() +
theme(axis.title.x = element_blank())
} else {
toxPlot_All <- toxPlot_All +
scale_y_log10(
labels = fancyNumbers,
breaks = pretty_logs_new
) +
theme(axis.title.x = element_blank())
}

} else {
toxPlot_All <- toxPlot_All +
scale_y_log10(y_label,
labels = fancyNumbers,
breaks = pretty_logs_new
)
if(utils::packageVersion("ggplot2") == "4.0.0"){
toxPlot_All <- toxPlot_All +
scale_y_log10(y_label)
} else {
toxPlot_All <- toxPlot_All +
scale_y_log10(
y_label,
labels = fancyNumbers,
breaks = pretty_logs_new
)
}
}

if (all(is.na(palette))) {
Expand Down
44 changes: 30 additions & 14 deletions R/plot_group_boxplots.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#' @export
#' @rdname plot_tox_boxplots
#' @import ggplot2
#' @examples
#' @examplesIf identical(Sys.getenv("NOT_CRAN"), "true")
#' # This is the example workflow:
#' path_to_tox <- system.file("extdata", package = "toxEval")
#' file_name <- "OWC_data_fromSup.xlsx"
Expand All @@ -61,9 +61,10 @@
#' cleaned_ep <- clean_endPoint_info(end_point_info)
#' filtered_ep <- filter_groups(cleaned_ep)
#' chemical_summary <- get_chemical_summary(tox_list, ACC, filtered_ep)
#' \donttest{
#' plot_tox_boxplots(chemical_summary, "Biological")
#'
#' \donttest{
#'
#' plot_tox_boxplots(chemical_summary, "Chemical Class")
#' plot_tox_boxplots(chemical_summary, "Chemical")
#'
Expand Down Expand Up @@ -283,18 +284,33 @@ plot_tox_boxplots <- function(chemical_summary,
}

if (isTRUE(y_label == "")) {
bioPlot <- bioPlot +
scale_y_log10(
labels = fancyNumbers,
breaks = pretty_logs_new
) +
theme(axis.title.x = element_blank())
if(utils::packageVersion("ggplot2") == "4.0.0"){
bioPlot <- bioPlot +
scale_y_log10() +
theme(axis.title.x = element_blank())
} else {

bioPlot <- bioPlot +
scale_y_log10(
labels = fancyNumbers,
breaks = pretty_logs_new
) +
theme(axis.title.x = element_blank())
}

} else {
bioPlot <- bioPlot +
scale_y_log10(y_label,
labels = fancyNumbers,
breaks = pretty_logs_new
)
if(utils::packageVersion("ggplot2") == "4.0.0"){
bioPlot <- bioPlot +
scale_y_log10(y_label)
} else {
bioPlot <- bioPlot +
scale_y_log10(
y_label,
labels = fancyNumbers,
breaks = pretty_logs_new
)
}

}

bioPlot <- bioPlot +
Expand Down Expand Up @@ -346,7 +362,7 @@ plot_tox_boxplots <- function(chemical_summary,
theme(plot.title = element_text(size = font_size, margin = margin(b = 5)))
} else {
bioPlot_w_labels <- bioPlot_w_labels +
theme(plot.title = element_text(size = font_size, margin = margin(b = 5)))
theme(plot.title = element_text(margin = margin(b = 5)))
}
}

Expand Down
40 changes: 27 additions & 13 deletions R/plot_tox_endpoints.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#' endpoints will be included.
#' @export
#' @import ggplot2
#' @examples
#' @examplesIf identical(Sys.getenv("NOT_CRAN"), "true")
#' # This is the example workflow:
#' path_to_tox <- system.file("extdata", package = "toxEval")
#' file_name <- "OWC_data_fromSup.xlsx"
Expand All @@ -50,11 +50,13 @@
#' filtered_ep <- filter_groups(cleaned_ep)
#' chemical_summary <- get_chemical_summary(tox_list, ACC, filtered_ep)
#'
#' \donttest{
#'
#' plot_tox_endpoints(chemical_summary,
#' filterBy = "Cell Cycle",
#' top_num = 10
#' )
#' \donttest{
#'
#' plot_tox_endpoints(chemical_summary,
#' filterBy = "Cell Cycle",
#' top_num = 10,
Expand Down Expand Up @@ -261,18 +263,30 @@ plot_tox_endpoints <- function(chemical_summary,
}
}
if (isTRUE(y_label == "")) {
stackedPlot <- stackedPlot +
scale_y_log10(
labels = fancyNumbers,
breaks = pretty_logs_new
) +
theme(axis.title.x = element_blank())
if(utils::packageVersion("ggplot2") == "4.0.0"){
stackedPlot <- stackedPlot +
scale_y_log10() +
theme(axis.title.x = element_blank())
} else {
stackedPlot <- stackedPlot +
scale_y_log10(
labels = fancyNumbers,
breaks = pretty_logs_new
) +
theme(axis.title.x = element_blank())
}

} else {
stackedPlot <- stackedPlot +
scale_y_log10(y_label,
labels = fancyNumbers,
breaks = pretty_logs_new
)
if(utils::packageVersion("ggplot2") == "4.0.0"){
stackedPlot <- stackedPlot +
scale_y_log10(y_label)
} else {
stackedPlot <- stackedPlot +
scale_y_log10(y_label,
labels = fancyNumbers,
breaks = pretty_logs_new
)
}
}

plot_layout <- ggplot_build(stackedPlot)$layout
Expand Down
35 changes: 23 additions & 12 deletions R/plot_tox_endpoints2.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#' @param ... Additional group_by arguments. This can be handy for creating facet graphs.
#' @export
#' @import ggplot2
#' @examples
#' @examplesIf identical(Sys.getenv("NOT_CRAN"), "true")
#'
#' \donttest{
#' path_to_tox <- system.file("extdata", package = "toxEval")
Expand Down Expand Up @@ -185,18 +185,29 @@ plot_tox_endpoints2 <- function(cs, ...,
}

if (isTRUE(y_label == "")) {
stackedPlot <- stackedPlot +
scale_y_log10(
labels = fancyNumbers,
breaks = pretty_logs_new
) +
theme(axis.title.x = element_blank())
if(utils::packageVersion("ggplot2") == "4.0.0"){
stackedPlot <- stackedPlot +
scale_y_log10() +
theme(axis.title.x = element_blank())
} else {
stackedPlot <- stackedPlot +
scale_y_log10(
labels = fancyNumbers,
breaks = pretty_logs_new
) +
theme(axis.title.x = element_blank())
}
} else {
stackedPlot <- stackedPlot +
scale_y_log10(y_label,
labels = fancyNumbers,
breaks = pretty_logs_new
)
if(utils::packageVersion("ggplot2") == "4.0.0"){
stackedPlot <- stackedPlot +
scale_y_log10(y_label)
} else {
stackedPlot <- stackedPlot +
scale_y_log10(y_label,
labels = fancyNumbers,
breaks = pretty_logs_new
)
}
}

plot_layout <- ggplot_build(stackedPlot)$layout
Expand Down
6 changes: 3 additions & 3 deletions inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ bibentry(bibtype = "Manual",
as.person("Gerald T. Ankley")),
title = "toxEval: Evaluation of measured concentration data using the ToxCast high-throughput screening database or a user-defined set of concentration benchmarks.",
publisher = "U.S. Geological Survey",
version = "1.4.0",
version = "1.4.1",
address="Reston, VA",
institution = "U.S. Geological Survey",
year = 2024,
year = 2025,
doi = "10.5066/P1CQJHJV",
url = "https://code.usgs.gov/water/toxEval",
textVersion = "De Cicco, L.A., Corsi, S.R., Villeneuve D.L, Blackwell, and B.R, Ankley, G.T., 2024, toxEval: Evaluation of measured concentration data using the ToxCast high-throughput screening database or a user-defined set of concentration benchmarks. R package version 1.4.0., U.S. Geological Survey software release. Reston, VA., doi:10.5066/P1CQJHJV"
textVersion = "De Cicco, L.A., Corsi, S.R., Villeneuve D.L, Blackwell, and B.R, Ankley, G.T., 2025, toxEval: Evaluation of measured concentration data using the ToxCast high-throughput screening database or a user-defined set of concentration benchmarks. R package version 1.4.1., U.S. Geological Survey software release. Reston, VA., doi:10.5066/P1CQJHJV"
)
Binary file modified man/figures/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion man/plot_tox_boxplots.Rd

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

Loading
Loading