diff --git a/DESCRIPTION b/DESCRIPTION index 74f812bcad451798abe90957d846aaaa3a699057..e6e6b2c49527343718da8abdcf57a66cd7e59367 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: stressaddition Type: Package Title: Modeling Tri-Phasic Concentration-Response Relationships -Version: 2.6.0 -Date: 2020-04-07 +Version: 2.7.0 +Date: 2020-04-17 Authors@R: c(person("Sebastian", "Henz", role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index 3c1cfec4c77f21f5a928ab2a58182584afb4798e..3dcbf77b3280a53d4cfc48658f80cf6e6aecd6ef 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# stressaddition 2.7.0 + +* Fixed some spelling mistakes. +* `predict_mixture()` now also returns the various stresses. + # stressaddition 2.6.0 * The `curves` data frame in the output of `ecxsys()` now contains a column with the concentrations which are used for the plot functions in this package. This is useful for generating a nicer concentration axis. diff --git a/R/ecxsys.R b/R/ecxsys.R index a257531a8cea1308ddab99d5dbff2e915d5cd8d5..5eaed9469ab10e434be7ae529e44836f9e3abadd 100644 --- a/R/ecxsys.R +++ b/R/ecxsys.R @@ -28,7 +28,7 @@ #' ECx-SyS #' -#' The ECx-SyS model for modeling concentration-effect relationships whith +#' The ECx-SyS model for modeling concentration-effect relationships with #' hormesis. #' #' It is advised to complete the curve down to zero for optimal prediction. diff --git a/R/predict_mixture.R b/R/predict_mixture.R index f4045cb600fa4a5c5754ee30e536e87c958d11c1..ccd9e3524f9f5ec9c384216715b5b1afbdae19c2 100644 --- a/R/predict_mixture.R +++ b/R/predict_mixture.R @@ -41,7 +41,7 @@ #' this should be 100 (the default). #' #' @return A data frame with columns of the supplied concentrations and the -#' corresponding mixture effects. +#' corresponding mixture effects and stresses. #' #' @examples toxicant_a <- ecxsys( #' concentration = c(0, 0.05, 0.5, 5, 30), @@ -132,9 +132,16 @@ predict_mixture <- function(model_a, stress_total <- stress_tox_total + sys_total effect <- stress_to_effect(stress_total) * effect_max - # Setting row.names to NULL to prevent row names when one of the - # concentrations is a single number. - data.frame(concentration_a, concentration_b, effect, row.names = NULL) + data.frame( + concentration_a = concentration_a, + concentration_b = concentration_b, + effect = effect, + stress_tox_sam = stress_tox_sam, + stress_tox_ca = stress_tox_ca, + stress_tox = stress_tox_total, + sys = sys_total, + stress_total = stress_total + ) } diff --git a/man/ecxsys.Rd b/man/ecxsys.Rd index f8a83b84a63e84a7ad793e2124dc695a8d6f0e45..42d14bdafbaf951a547fc72b6ab63000acdeeac4 100644 --- a/man/ecxsys.Rd +++ b/man/ecxsys.Rd @@ -66,7 +66,7 @@ A list (of class ecxsys) containing many different objects of which } } \description{ -The ECx-SyS model for modeling concentration-effect relationships whith +The ECx-SyS model for modeling concentration-effect relationships with hormesis. } \details{ diff --git a/man/predict_mixture.Rd b/man/predict_mixture.Rd index a769976c97c4e4d8a136dcae1042773fd206b513..7c1302d185dfabf76e49cd55b5372826f1dd10b5 100644 --- a/man/predict_mixture.Rd +++ b/man/predict_mixture.Rd @@ -30,7 +30,7 @@ this should be 100 (the default).} } \value{ A data frame with columns of the supplied concentrations and the - corresponding mixture effects. + corresponding mixture effects and stresses. } \description{ Given the ecxsys models of two toxicants this method predicts the effects of