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

plot.reproData

Plotting method for reproData objects


Description

This is the generic plot S3 method for the reproData class. It plots the cumulated number of offspring as a function of time.

Usage

## S3 method for class 'reproData'
plot(
  x,
  xlab,
  ylab = "Cumulated Number of offspring",
  main = NULL,
  concentration = NULL,
  style = "ggplot",
  pool.replicate = FALSE,
  addlegend = FALSE,
  remove.someLabels = FALSE,
  ...
)

Arguments

x

an object of class reproData

xlab

label of the X-axis

ylab

label of the Y-axis, by default Cumulated Number of offspring

main

main title for the plot

concentration

a numeric value corresponding to some concentration in data. If concentration = NULL, draws a plot for each concentration

style

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

pool.replicate

if TRUE, the datapoints of each replicate are summed for a same concentration

addlegend

if TRUE, adds a default legend to the plot

remove.someLabels

if TRUE, removes 3/4 of X-axis labels in 'ggplot' style to avoid the label overlap

...

Further arguments to be passed to generic methods

Note

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

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

Examples

# (1) Load the data
data(cadmium1)

# (2) Create an object of class 'reproData'
cadmium1 <- reproData(cadmium1)

# (3) Plot the reproduction data
plot(cadmium1)

# (4) Plot the reproduction data for a fixed concentration
plot(cadmium1, concentration = 4.36, 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.