posum.check {posum}R Documentation

Check a posum input dataframe

Description

Performs simple checks on the input data for posum: mostly just checking that there are no missing values where they are not allowed. Returns TRUE if dataframe contains adult data, FALSE otherwise.

Usage

posum.check(data)

Arguments

data A data frame containing the following named variables:
y
The stage population data. This may contain NA's: a feature whose prime function is to allow the user to supply extra information about stage boundaries, if needed.
stage
Which stage each element of y relates to.
a0
The lower age boundary for this observation.
a1
The upper age boundary for this observation. NA implies an adult stage. If an element is equal to the corresponding a0 element then the corresponding y is taken as a direct observation of the population surface height (rather than the usual integral under it.)
t
Sample time for each observation.

Details

Missing stage populaiton data is allowed in the input dataframe to posum, but missing age boundaries and sample times are not (except for upper boundary of an adult stage). This routine checks an input datafraem for illegal missing values.

Value

Returns TRUE if data contains information on an adult (indeterminate duration) stage, FALSE otherwise. Will stop with an error if illegal missing values are encountered.

WARNING

Author(s)

Simon N. Wood snw@st-and.ac.uk

References

http://www.ruwpa.st-and.ac.uk/simon.html

See Also

posum,

Examples

data<-population.data(fam="p",adult=TRUE) #simulate data
posum.check(data)

[Package Contents]