SpringPeeperCalls: Simulation of spring peeper calls

Description Usage Arguments Details Value Author(s) References Examples

View source: R/SpringPeeperCalls.R

Description

Imagine we plan to conduct a large-scale occupancy survey for spring peeper frogs using aural surveys, ie, we go to ponds and wetlands in the evening and listen for spring peeper calls. For an optimal design, we need an approximate estimate of the probability of hearing calls given the frogs are present. So we identify a number of ponds near our lab where we know the frogs are present, and we go and listen, recording the proportion of ponds where we hear frogs.

This function displays a series of pictures of spring peepers calling or not calling (silent) with a given probability that they are calling.

Usage

1
SpringPeeperCalls(n=10, p=0.75)

Arguments

n

integer, the number of visits to ponds to simulate

p

the probability of hearing frogs at a specific pond

Details

When the function is called, a plot appears with an empty rectangle. Click on the plot to begin, then on the plot repeatedly to advance to the next image. The sequence can be interrupted by right-clicking on the plot and selecting 'stop'.

Value

Returns invisibly a 1/0 vector of length n where 1 indicates detection, 0 non-detection. If the sequence is interrupted, the remaining places are filled with NAs.

Author(s)

Mike Meredith

References

MacKenzie, D I; J D Nichols; G B Lachman; S Droege; J A Royle; C A Langtimm. 2002. Estimating site occupancy rates when detection probabilities are less than one. Ecology 83:2248-2255.

Examples

1
2
3
4
if(interactive()) {
res <- SpringPeeperCalls()
res
}

mikemeredith/toybox documentation built on May 22, 2019, 2:48 p.m.