PresSer: Series of Simulated Random Observations in Partially...

Description Usage Arguments Details Value Note See Also Examples

View source: R/PresSer.R

Description

The function draws on the function PresMod to create a series of hypothetical preservation states from populations of defined size, with given numbers of individuals displaying a certain trait and a given portion of individuals unaffected by taphonomy.

Usage

1
PresSer(n, c, s, i = 1, value_spec = "count")

Arguments

n

An integer or vector specifying the number(s) of individuals/elements in the population(s).

c

Cases, i.e. the number or portion of individuals/elements carrying the trait of interest in a scenario. Depending on the specification of value_spec, c is either given as an integer or vector expressing the absolute number(s) of cases (value_spec = 'count') or as a decimal value between 0 and 1 or vector of such values expressing the portion(s) of individuals/elements in n that are affected (value_spec = 'portion').

s

Sample, i.e. the number or portion of individuals/elements in the population that are to survive taphonomy. Depending on the specification of value_spec, s is either given as an integer or vector expressing the absolute number(s) of preserved individuals/elements (value_spec = 'count') or as a decimal value between 0 and 1 or vector of such values expressing the portion(s) of individuals/elements in the population that are preserved (value_spec = 'portion').

i

Integer or vector specifying the number(s) of iterations. By default i is set to 1.

value_spec

The method how c and s are specified, either as absolute counts of cases and preserved individuals/elements or as portions of n. Options are the strings 'count' and 'portion'; the default is 'count'.

Details

The parameters, with the exceptions of value_spec, can be vectors of any length, and their lengths do not have to match. The function runs the PresMod function on all possible combinations of parameters.

The resulting data can be used for modelling the impact of material preservation on the calculation of frequencies under diverse conditions.

Value

A data frame is returned, giving the output of PresMod for all combinations of parameters. If value_spec = 'portion', the specified portions of c and s are also given ('c_portion' and 's_portion').

Note

Note that if c and s are specified as a portions (value_spec = 'portion'), the function uses the round function with the rounding behaviour implemented there. Please make sure that you approve of this procedure. In case of doubt, it is advisable to give absolute numbers of cases and preserved individuals/elements (value_spec = 'count').

See Also

PresMod

Examples

1
2
3
4
5
## Specification of case numbers and sample sizes as absolute numbers
PresSer(n=c(60, 70, 80), c=c(5, 12), s=55, i=2)

## Specification of case numbers and sample sizes as portions
PresSer(n=c(60, 70, 80), c=0.8, s=c(0.65, 0.55), i=3, value_spec="portion")

cuboideum/deadpop documentation built on Feb. 5, 2021, 11:21 p.m.