plotSurvivalCurve: Survival curve for the Life and Fertility Table

plotSurvivalCurveR Documentation

Survival curve for the Life and Fertility Table

Description

This function generates the graphical representation of the Life Table. Survival (y-axis) versus Age (x-axis)

Usage

plotSurvivalCurve(object)

Arguments

object

object accepts 2 classes of objects:

  • An object inheriting from lifertable(), representing the Life and Fertility Table.

  • An object of class lifertableLFT inherited from lifertable(). This is the object that displays the Life and Fertility Table.

Value

Returns an object of class c("gg", "ggplot").

Examples

## The main object will be created using the Insects database:
lft <- lifertable(ColumnFemale = Female,
                  ColumnAge = Age,
                  ColumnEggs = Eggs,
                  SexRate = Sexrate,
                  ColumnGroups = Group,
                  data = Insects)

## Possible usage scenarios

## 1. Direct Usage of the "lft" Object:
plotSurvivalCurve(lft)

## 2. Assigning the component "LIFERTABLE" to an object:
lifeTable <- lft$LIFERTABLE
plotSurvivalCurve(lifeTable)

## 3. Direct usage of the component:
plotSurvivalCurve(lft$LIFERTABLE)




Lifertable documentation built on April 12, 2025, 1:43 a.m.