export.MARK: Export data and models for import in MARK

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/export.MARK.r

Description

Creates a .Rinp, .inp and optionally renamed output files that can be imported into MARK to create a new MARK project with all the data and output files.

Usage

1
2
export.MARK(x, project.name, model = NULL, replace = FALSE, chat = 1,
  title = "", ind.covariates = "all")

Arguments

x

processed data list used to build models

project.name

character string to be used for prefix of filenames and for MARK project name; do not use "." in the filename

model

either a single mark model or a marklist

replace

if TRUE it will replace any existing files

chat

user-specified chat value if desired

title

MARK project title string

ind.covariates

vector of character strings specifying names of individual covariates or "all" to use all present

Details

If you use Nest model and NestAge covariate you should use the processed data list (model$data) from a model using NestAge in the formula because the necessary individual covariates are added to the processed data list. Also, use default of ind.covariates="all".

After running this function to export the data and models to the working directory, start program MARK and select the File/RMARK Import menu item. Navigate to the working directory and select the "project.name".Rinp file. MARK will take over and create the project files and will import any specified model output files.

DO NOT use a "project name" that is the same as a filename you use as input (*.inp) to RMark because this function will create a file "project name".inp and it would over-write your existing file and the format could change. If you try this, the code will return an error that the filename is invalid because the file already exists.

Value

None

Author(s)

Jeff Laake

See Also

export.chdata, export.model

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# This example is excluded from testing to reduce package check time
data(mallard)
Dot=mark(mallard,nocc=90,model="Nest",
	model.parameters=list(S=list(formula=~1)))
mallard.proc=process.data(mallard,nocc=90,model="Nest")
export.MARK(mallard.proc,"mallard",Dot,replace=TRUE)
data(robust)
time.intervals=c(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
S.time=list(formula=~time)
p.time.session=list(formula=~-1+session:time,share=TRUE)
GammaDoublePrime.random=list(formula=~time,share=TRUE)
model.1=mark(data = robust, model = "Robust",
	time.intervals=time.intervals,
	model.parameters=list(S=S.time,
			GammaDoublePrime=GammaDoublePrime.random,p=p.time.session))
robust.proc=process.data(data = robust, model = "Robust",
	time.intervals=time.intervals)
export.MARK(robust.proc,"robust",	model.1,replace=TRUE)

RMark documentation built on Nov. 7, 2019, 1:06 a.m.

Related to export.MARK in RMark...