Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plotDoseResponse.survDataCstExp

Plot dose-response from survData objects


Description

This is the generic plotDoseResponse S3 method for the survData class. It plots the survival probability as a function of concentration at a given target time.

Usage

## S3 method for class 'survDataCstExp'
plotDoseResponse(
  x,
  xlab = "Concentration",
  ylab = "Survival probability",
  main = NULL,
  target.time = NULL,
  style = "ggplot",
  log.scale = FALSE,
  remove.someLabels = FALSE,
  addlegend = TRUE,
  ...
)

Arguments

x

an object of class survData

xlab

a label for the X-axis, by default Concentration

ylab

a label for the Y-axis, by default Survival probability

main

main title for the plot

target.time

a numeric value corresponding to some observed time in data

style

graphical backend, can be 'ggplot' or 'generic'

log.scale

if TRUE, displays X-axis in log-scale

remove.someLabels

if TRUE, removes 75% of X-axis labels in 'ggplot' style to avoid the label overlap

addlegend

if TRUE, adds a default legend to the plot

...

Further arguments to be passed to generic methods

Details

The function plots the observed values of the survival probability at a given time point as a function of concentration. The 95 % binomial confidence interval is added to each survival probability. It is calculated using function binom.test from package stats. Replicates are systematically pooled in this plot.

Note

When style = "generic", the function calls the generic function plot

When style = "ggplot", the function return an object of class ggplot, see function ggplot

See Also

Examples

library(ggplot2)

# (1) Load the data
data(zinc)

# (2) Create an object of class 'survData'
zinc <- survData(zinc)

# (3) Plot dose-response
plotDoseResponse(zinc)

# (4) Plot dose-respo nse with a generic style
plotDoseResponse(zinc, style = "generic")

morse

Modelling Tools for Reproduction and Survival Data in Ecotoxicology

v3.3.1
GPL (>= 2)
Authors
Virgile Baudrot [aut], Sandrine Charles [aut], Marie Laure Delignette-Muller [aut], Wandrille Duchemin [ctb], Benoit Goussen [ctb], Nils Kehrein [ctb], Guillaume Kon-Kam-King [ctb], Christelle Lopes [ctb], Philippe Ruiz [aut], Alexander Singer [ctb], Philippe Veber [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.