Learn R Programming

RMark (version 3.0.0)

export.chdata: 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)

Value

None

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

Author

Jeff Laake

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.

See Also

import.chdata

Examples

Run this code
# \donttest{
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

Run the code above in your browser using DataLab