export.chdata: Export capture-history data to MARK .inp format

View source: R/export.chdata.R

export.chdataR Documentation

Export capture-history data to MARK .inp format

Description

Creates a MARK .inp file from processed data list that can be used to create a MARK .dbf file for use with MARK directly rather than with the RMark package.

Usage

export.chdata(data, filename, covariates = NULL, replace = FALSE)

Arguments

data

processed data list resulting from process.data

filename

quoted filename (without .inp extension)

covariates

vector of names of covariate variables in data to include

replace

if file exists and replace=TRUE, file will be over-written

Details

The default is to include none of the covariates in the processed data list. All of the covariates can be passed by setting covariates="all".

After you have created the MARK .dbf/.fpt files with the exported .inp file, then you can use export.chdata to export models that can be imported into the MARK interface. However note the following: ***Warning*** Make sure that you use the .inp created by export.chdata with your processed data to create the MARK .dbf file rather than using a separate similar .inp file. It is essential that the group structure and ordering of groups matches between the .inp file and the exported models or you can get erroneous results.

Value

None

Author(s)

Jeff Laake

See Also

import.chdata

Examples


data(dipper)
dipper$numeric.sex=as.numeric(dipper$sex)-1
dipper.processed=process.data(dipper,group="sex")
export.chdata(dipper.processed, filename="dipper", 
          covariates="numeric.sex",replace=TRUE)
file.remove("dipper.inp")

#
# Had sex been used in place of numeric.sex in the above command, 
# MARK would have been unable to use it as a covariate
# because it is not a numeric field


RMark documentation built on Aug. 14, 2022, 1:05 a.m.

Related to export.chdata in RMark...