occData | R Documentation |
Computes occupancy data matrices from a data frame of tabular detection data.
occData(d, siteColName = "site", sampleColName = "sample")
d |
data frame containing tabular detection data |
siteColName |
column of data frame d containing sites (i.e., primary sample units) |
sampleColName |
column of data frame d containing sample numbers (i.e., integers 1, 2, ...) for each site |
This function takes a data frame of tabular detection data and returns a list containing a matrix of numbers of detections per sample and a matrix of numbers of replicates per sample.
The number of samples per site may differ among sites. In addition, the number of replicates per sample may differ among samples. Such unbalanced designs will induce NAs in the detection matrix (y) and zeros in the replicate number matrix (K).
A list containing two matrices:
M x J matrix of numbers of detections per sample
M x J matrix of numbers of replicates per sample
where M = no. sites and J = maximum no. samples per site
data(gobyDetectionData)
occData(gobyDetectionData, "site", "sample")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.