| autoplot.lifetable | R Documentation |
Produces a ggplot2 representation of the number of survivors by age. The method is defined for 'lifetable'; S3 dispatch also makes it available for S4 subclasses such as 'actuarialtable'.
## S3 method for class 'lifetable'
autoplot(object, ...)
object |
A 'lifetable' object, or an object inheriting from it. |
... |
Additional arguments passed to 'ggplot2::geom_line()'. |
A 'ggplot2' plot object.
lt <- new("lifetable", x = 0:3, lx = c(100, 90, 50, 10))
ggplot2::autoplot(lt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.