plot.LCx: Plotting method for 'LCx' objects

View source: R/plot.LCx.R

plot.LCxR Documentation

Plotting method for LCx objects

Description

This is the generic plot S3 method for the \codeLCx class. It plots the survival probability as a function of concentration.

Usage

## S3 method for class 'LCx'
plot(
  x,
  xlab = "Concentration",
  ylab = "Survival probability \n median and 95 CI",
  main = NULL,
  subtitle = NULL,
  ...
)

Arguments

x

An object of class LCx.

xlab

A label for the X-axis, by default Concentration.

ylab

A label for the Y-axis, by default Survival probability median and 95 CI.

main

A main title for the plot.

subtitle

A subtitle for the plot

...

Further arguments to be passed to generic methods.

Value

a plot of class ggplot

Examples


# (1) Load the data
data("propiconazole")

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


# (3) Run the survFit function with model_type SD (or IT)
out_SD <- survFit(dataset, model_type = "SD")

# (4) estimate LC50 at time 4
LCx_SD <- LCx(out_SD, X = 50, time_LCx = 4)

# (5) plot the object of class 'LCx'
plot(LCx_SD)



morse documentation built on Oct. 29, 2022, 1:14 a.m.