Skip to content
Snippets Groups Projects
Commit ccf767dd authored by Sebastian Henz's avatar Sebastian Henz
Browse files

Add return values to some documentation

According to CRAN rules all exported functions must specify a return value.
parent 709b625b
No related branches found
No related tags found
No related merge requests found
Package: stressaddition Package: stressaddition
Type: Package Type: Package
Title: Modelling Tri-Phasic Concentration-Response Relationships Title: Modelling Tri-Phasic Concentration-Response Relationships
Version: 3.0.0 Version: 3.0.1
Date: 2020-07-06 Date: 2020-07-28
Authors@R: c(person("Sebastian", Authors@R: c(person("Sebastian",
"Henz", "Henz",
role = c("aut", "cre"), role = c("aut", "cre"),
......
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
#' the number of elements shown. #' the number of elements shown.
#' @param xlab,ylab,main Axis labels and title. #' @param xlab,ylab,main Axis labels and title.
#' #'
#' @return None
#'
#' @examples model <- ecxsys( #' @examples model <- ecxsys(
#' concentration = c(0, 0.05, 0.5, 5, 30), #' concentration = c(0, 0.05, 0.5, 5, 30),
#' hormesis_concentration = 0.5, #' hormesis_concentration = 0.5,
......
...@@ -194,4 +194,5 @@ plot_stress <- function(model, ...@@ -194,4 +194,5 @@ plot_stress <- function(model,
) )
} }
} }
NULL # suppress all possible return values
} }
...@@ -175,4 +175,5 @@ plot_survival <- function(model, ...@@ -175,4 +175,5 @@ plot_survival <- function(model,
) )
} }
} }
NULL # suppress all possible return values
} }
...@@ -24,9 +24,7 @@ ...@@ -24,9 +24,7 @@
#' #'
#' These are simple wrappers around the beta distribution function #' These are simple wrappers around the beta distribution function
#' \code{\link[stats:Beta]{pbeta}} and the beta quantile function #' \code{\link[stats:Beta]{pbeta}} and the beta quantile function
#' \code{\link[stats:Beta]{qbeta}}. \code{stress_to_survival} returns \code{1 - #' \code{\link[stats:Beta]{qbeta}}.
#' pbeta(stress, p, q)}. \code{survival_to_stress} first clamps the survival to
#' the interval [0, 1] and then returns \code{qbeta(1 - survival, p, q)}.
#' #'
#' @name Stressconversion #' @name Stressconversion
#' #'
...@@ -37,6 +35,12 @@ ...@@ -37,6 +35,12 @@
#' @param p,q The shape parameters of the \code{\link[stats:Beta]{beta}} #' @param p,q The shape parameters of the \code{\link[stats:Beta]{beta}}
#' distribution. Default is 3.2. #' distribution. Default is 3.2.
#' #'
#' @return \code{stress_to_survival} returns a vector the same length as
#' \code{stress} giving the survival caused by each amount of stress.
#'
#' \code{survival_to_stress} returns a vector the same length as
#' \code{survival} containing the stress values associated with each survival.
#'
#' @examples #' @examples
#' stress <- 0.3 #' stress <- 0.3
#' survival <- stress_to_survival(stress) #' survival <- stress_to_survival(stress)
......
...@@ -20,6 +20,13 @@ distribution. Default is 3.2.} ...@@ -20,6 +20,13 @@ distribution. Default is 3.2.}
\item{stress}{One or more stress values to convert to survival.} \item{stress}{One or more stress values to convert to survival.}
} }
\value{
\code{stress_to_survival} returns a vector the same length as
\code{stress} giving the survival caused by each amount of stress.
\code{survival_to_stress} returns a vector the same length as
\code{survival} containing the stress values associated with each survival.
}
\description{ \description{
Functions to convert survival to general stress or vice versa using the beta Functions to convert survival to general stress or vice versa using the beta
distribution. distribution.
...@@ -27,9 +34,7 @@ distribution. ...@@ -27,9 +34,7 @@ distribution.
\details{ \details{
These are simple wrappers around the beta distribution function These are simple wrappers around the beta distribution function
\code{\link[stats:Beta]{pbeta}} and the beta quantile function \code{\link[stats:Beta]{pbeta}} and the beta quantile function
\code{\link[stats:Beta]{qbeta}}. \code{stress_to_survival} returns \code{1 - \code{\link[stats:Beta]{qbeta}}.
pbeta(stress, p, q)}. \code{survival_to_stress} first clamps the survival to
the interval [0, 1] and then returns \code{qbeta(1 - survival, p, q)}.
} }
\examples{ \examples{
stress <- 0.3 stress <- 0.3
......
...@@ -42,6 +42,9 @@ the number of elements shown.} ...@@ -42,6 +42,9 @@ the number of elements shown.}
\item{xlab, ylab, main}{Axis labels and title.} \item{xlab, ylab, main}{Axis labels and title.}
} }
\value{
None
}
\description{ \description{
Plot the observed and modeled survivals and stresses. Plot the observed and modeled survivals and stresses.
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment