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

Prep for CRAN submission #74

Merged
merged 6 commits into from
Nov 7, 2024
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: 7 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ Version: 0.1.4
Authors@R: c(
person("Skylar", "Marvel", , "[email protected]", role = c("aut", "ctb"), comment = c(ORCID = "0000-0002-2971-9743")),
person("David", "Reif", , "[email protected]", role = c("aut", "ctb"), comment = c(ORCID = "0000-0001-7815-6767")),
person("Kyle", "Messier", , "[email protected]", role = c("cre", "aut", "ctb"), comment = c(ORCID = "0000-0001-9508-9623"))
person("Kyle", "Messier", , "[email protected]", role = c("cre", "aut", "ctb"), comment = c(ORCID = "0000-0001-9508-9623")),
person("Spatiotemporal Exposures and Toxicology Group", role = c("cph"))
)
Description: Connecting spatiotemporal exposure to individual and population-level risk via source-to-outcome continuum modeling.
Description: Connecting spatiotemporal exposure to individual and
population-level risk via source-to-outcome continuum modeling. The package,
methods, and case-studies are described in Messier, Reif, and Marvel (2024)
<doi:10.1101/2024.09.23.24314096> and Eccles et al. (2023)
<doi:10.1016/j.scitotenv.2022.158905>.
License: MIT + file LICENSE
URL: https://niehs.github.io/GeoTox/, https://github.com/NIEHS/GeoTox
Depends:
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export(get_fixed_css)
export(get_fixed_obesity)
export(get_fixed_other)
export(get_fixed_params)
export(hill_conc)
export(hill_val)
export(plot_exposure)
export(plot_hill)
export(plot_resp)
Expand Down
1 change: 1 addition & 0 deletions R/check_lengths.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#' @param y list of arrays
#'
#' @keywords internal
#' @noRd
#'
#' @return boolean, TRUE for error
.check_lengths <- function(x, y) {
Expand Down
1 change: 1 addition & 0 deletions R/check_names.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#' @param names names to look for
#'
#' @keywords internal
#' @noRd
#'
#' @return boolean, TRUE for error
.check_names <- function(x, names) {
Expand Down
1 change: 1 addition & 0 deletions R/check_types.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#' @param msg error message
#'
#' @keywords internal
#' @noRd
#'
#' @return list version of input
.check_types <- function(x, types, msg = "Incorrect type") {
Expand Down
7 changes: 5 additions & 2 deletions R/hill_conc.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
#' @param AC50 concentration of half-maximal response
#' @param n Hill coefficient (slope)
#'
#' @keywords internal
#'
#' @return concentration in regular space
#' @export
#'
#' @details
#' This is a regular space version of
Expand All @@ -20,6 +19,10 @@
#' \deqn{conc = AC50 * (\frac{max}{resp} - 1)^{-1 / n}}
#'
#' @seealso \code{\link{hill_val}}
#'
#' @examples
#' hill_conc(c(0.2, 0.5, 0.75), 1, 0.01, 1)
#' hill_conc(c(0.2, 0.5, 0.9), 1, c(0.1, 0.01, 0.001), 2)
hill_conc <- function(resp, max, AC50, n) {

if (any(AC50 < 0)) {
Expand Down
7 changes: 5 additions & 2 deletions R/hill_val.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
#' @param AC50 concentration of half-maximal response
#' @param n Hill coefficient (slope)
#'
#' @keywords internal
#'
#' @return response value
#' @export
#'
#' @details
#' This is a regular space version of
Expand All @@ -20,6 +19,10 @@
#' \deqn{resp = \frac{max}{1 + (\frac{AC50}{conc})^{n}}}
#'
#' @seealso \code{\link{hill_conc}}
#'
#' @examples
#' hill_val(c(0.0025, 0.01, 0.03), 1, 0.01, 1)
#' hill_val(c(0.05, 0.01, 0.003), 1, c(0.1, 0.01, 0.001), 2)
hill_val <- function(conc, max, AC50, n) {

if (any(conc < 0) || any(AC50 < 0)) {
Expand Down
1 change: 1 addition & 0 deletions R/obj_ECx.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#' @param AC50 concentrations of half-maximal response
#'
#' @keywords internal
#' @noRd
#'
#' @return objective value
obj_ECx <- function(conc_mix, resp, conc, max, AC50) {
Expand Down
1 change: 1 addition & 0 deletions R/obj_GCA.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#' @param AC50 concentrations of half-maximal response
#'
#' @keywords internal
#' @noRd
#'
#' @return objective value
obj_GCA <- function(ln_resp, conc, max, AC50) {
Expand Down
1 change: 1 addition & 0 deletions R/obj_hill.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#' @param resp response
#'
#' @keywords internal
#' @noRd
#'
#' @return value of the objective function
obj_hill <- function(par, log10_conc, resp) {
Expand Down
20 changes: 14 additions & 6 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,30 @@ knitr::opts_chunk$set(
[![pkgdown](https://github.com/NIEHS/GeoTox/actions/workflows/pkgdown.yaml/badge.svg)](https://github.com/NIEHS/GeoTox/actions/workflows/pkgdown.yaml)
[![cov](https://NIEHS.github.io/GeoTox/badges/coverage.svg)](https://github.com/NIEHS/GeoTox/actions)
[![CRAN status](https://www.r-pkg.org/badges/version/GeoTox)](https://CRAN.R-project.org/package=GeoTox)
<!-- badges: end -->

<!-- badges: end -->

`GeoTox` open-source R software package for characterizing the risk of perturbing molecular targets involved in adverse human health outcomes based on exposure to spatially-referenced stressor mixtures via the GeoTox framework - otherwise known as source-to-outcome-continuum modeling. The package, methods, and case-studies are described in [Messier, Reif, and Marvel, 2024, medRxiv-Preprint](https://www.medrxiv.org/content/10.1101/2024.09.23.24314096v1).
`GeoTox` open-source R software package for characterizing the risk of perturbing molecular targets involved in adverse human health outcomes based on exposure to spatially-referenced stressor mixtures via the GeoTox framework - otherwise known as source-to-outcome-continuum modeling. The package, methods, and case-studies are described in [Messier, Reif, and Marvel, 2024, medRxiv-Preprint](https://www.medrxiv.org/content/10.1101/2024.09.23.24314096).

The GeoTox framework was first described in
[Eccles et al. A geospatial modeling approach to quantifying the risk of exposure to environmental chemical mixtures via a common molecular target. Sci Total Environ. 2023 Jan 10;855:158905.](https://pubmed.ncbi.nlm.nih.gov/36152849/)

## Installation

The package will be on CRAN in the near future - please stay tuned. You can install the development version of GeoTox from
[GitHub](https://github.com/NIEHS/GeoTox) with:
The package will be on CRAN in the near future - please stay tuned.
<!--
```{r, eval=FALSE}
install.packages("GeoTox")
```
-->

## Development Version

The development version can be installed from [GitHub](https://github.com/NIEHS/GeoTox) with:

```{r, eval=FALSE}
install.packages("pak")
pak::pkg_install("NIEHS/GeoTox")
#install.packages("pak")
pak::pak("NIEHS/GeoTox")
```

## Overview
Expand Down
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.re
[![cov](https://NIEHS.github.io/GeoTox/badges/coverage.svg)](https://github.com/NIEHS/GeoTox/actions)
[![CRAN
status](https://www.r-pkg.org/badges/version/GeoTox)](https://CRAN.R-project.org/package=GeoTox)

<!-- badges: end -->

`GeoTox` open-source R software package for characterizing the risk of
Expand All @@ -21,7 +22,7 @@ based on exposure to spatially-referenced stressor mixtures via the
GeoTox framework - otherwise known as source-to-outcome-continuum
modeling. The package, methods, and case-studies are described in
[Messier, Reif, and Marvel, 2024,
medRxiv-Preprint](https://www.medrxiv.org/content/10.1101/2024.09.23.24314096v1).
medRxiv-Preprint](https://www.medrxiv.org/content/10.1101/2024.09.23.24314096).

The GeoTox framework was first described in [Eccles et al. A geospatial
modeling approach to quantifying the risk of exposure to environmental
Expand All @@ -30,13 +31,21 @@ Jan 10;855:158905.](https://pubmed.ncbi.nlm.nih.gov/36152849/)

## Installation

The package will be on CRAN in the near future - please stay tuned. You
can install the development version of GeoTox from
The package will be on CRAN in the near future - please stay tuned. <!--

``` r
install.packages("GeoTox")
```
-->

## Development Version

The development version can be installed from
[GitHub](https://github.com/NIEHS/GeoTox) with:

``` r
install.packages("pak")
pak::pkg_install("NIEHS/GeoTox")
#install.packages("pak")
pak::pak("NIEHS/GeoTox")
```

## Overview
Expand Down
2 changes: 2 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ reference:
desc: Auxillary and helper functions
- contents:
- fit_hill
- hill_conc
- hill_val
- starts_with("get_")
- subtitle: Datasets
desc: Package datasets
Expand Down
7 changes: 6 additions & 1 deletion man/GeoTox-package.Rd

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

20 changes: 0 additions & 20 deletions man/dot-check_lengths.Rd

This file was deleted.

20 changes: 0 additions & 20 deletions man/dot-check_names.Rd

This file was deleted.

22 changes: 0 additions & 22 deletions man/dot-check_types.Rd

This file was deleted.

5 changes: 4 additions & 1 deletion man/hill_conc.Rd

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

5 changes: 4 additions & 1 deletion man/hill_val.Rd

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

28 changes: 0 additions & 28 deletions man/obj_ECx.Rd

This file was deleted.

25 changes: 0 additions & 25 deletions man/obj_GCA.Rd

This file was deleted.

22 changes: 0 additions & 22 deletions man/obj_hill.Rd

This file was deleted.

Loading