Description Usage Arguments Details Value Author(s) References Examples

View source: R/SpringPeeperCalls.R

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.

1 | ```
SpringPeeperCalls(n=10, p=0.75)
``` |

`n` |
integer, the number of visits to ponds to simulate |

`p` |
the probability of hearing frogs at a specific pond |

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'.

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.

Mike Meredith

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.

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.