lifeTable_check: Validate a Life Table Data Set

View source: R/lifetable_data.R

lifeTable_checkR Documentation

Validate a Life Table Data Set

Description

Checks the age data (illegal characters, negative values, illegal gaps) and verifies for every female that the number of her oviposition records matches her recorded survival days. If a problem is found, the function stops and reports the exact row and column positions of all offending cells.

Usage

lifeTable_check(lt)

Arguments

lt

A life_table object returned by lifeTable_read.

Details

Two kinds of problems are detected:

  • age data errors: cells in the stage-duration and survival-day columns that contain illegal characters or negative values, or illegal gaps within a sequence of values;

  • oviposition errors: for every female row, the number of non-empty daily fecundity cells must equal the adult survival days recorded in column n - 1.

The check runs automatically inside lifeTable_read unless check = FALSE is used there.

Value

invisible(TRUE) if no error is found; otherwise the function stops with a detailed error message.

See Also

lifeTable_read


insectecol documentation built on Oct. 5, 2026, 5:08 p.m.