prepSS {GenEst}R Documentation

Create search schedule data into an prepSS object for convenient splits analyses

Description

Since data_SS columns largely have a specific, required format, the prepSS function can often automatically decipher the data, but the user may specify explicit instructions for parsing the data for safety if desired. If the data are formatted properly, the automatic parsing is reliable in most cases. There are two exceptions. (1) If there is more than one column with possible dates (formatted as formal dates (as class Date, POSIXlt or POSIXct) or character strings or factors that can be unambiguously interpreted as dates (with assumed format "2018-05-15" or "2018/5/15"). In that case, the user must specify the desired dates as dateColumn. (2) If there is a covariate column consisting entirely of 0s and 1s. In that case, the user must specify the column(s) in covars.

Usage

prepSS(data_SS, SSdate = NULL, preds = NULL)

Arguments

data_SS

data frame or matrix with search schedule parameters, including columns for search dates, covariates (describing characteristics of the search intervals), and each unit (with 1s and 0s to indicate whether the given unit was searched (= 1) or not (= 0) on the given date)

SSdate

name of the column with the search dates in it (optional). If no SSdate is given, prepSS will try to find the date column based on data formats. If there is exactly one column that can be interpreted as dates, that column will be taken as the dates searched. If more than one date column is found, prepSS exits with an error message.

preds

vector of character strings giving the names of columns to be interpreted as potential covariates (optional). Typically, it is not necessary for a user to provide a value for preds. It is used only to identify specific columns of 1s and 0s as covariates rather than as search schedules.

Value

prepSS object that can be conveniently used in the splitting functions.

Examples

 data(mock)
 prepSS(mock$SS)


[Package GenEst version 1.4.9 Index]