make.so.data: Create spatial data object for model fitting via...

Description Usage Arguments Details Value Author(s)

Description

This function takes an observation data frame and a data frame of site characteristics and combines them together for analysis with the spatial.occupancy function.

Usage

1
make.so.data(visit.data, site.data, names)

Arguments

visit.data

A data frame that contains the observed occupancy for each site and any detection related covariates.

site.data

A data frame that contains the site id, coordinates, and any habitat related covariates that might influence the occupancy process

names

A named list with the following elements: (1)visit A named list with elements "site" = the name of the site id in the observation data frame and "obs" = the name of the observed occupancy variable (2) site A named list with elements "site" = the name of the site id and "coords" = a character vector giving the name of the coordinates (x first then y)

Details

This function combines the two data frames and assigns names so that spatial.occupancy knows which columns to use. It also performs some rudimentary error checking to make sure the data is in the proper form (e.g., the site IDs in the visit data frame must be contained in the site IDs for the site data frame)

Value

An so.data object is a list with elements equal to the two data frames. Attributes are set giving the names of columns of interest

Author(s)

Devin S. Johnson <devin.johnson@noaa.gov>


dsjohnson/stocc documentation built on May 15, 2019, 3:28 p.m.