Learn R Programming

openCR (version 2.2.6)

read.inp: Import Data from RMark Input Format

Description

read.inp forms a capthist object from a MARK input (.inp) file.

Usage

read.inp(filename, ngroups = 1, grouplabel = 'group', grouplevels = NULL, 
    covnames = NULL, skip = 0)

Value

A single-session capthist object with no traps attribute.

Arguments

filename

character file name including `.inp'.

ngroups

integer number of group columns in input

grouplabel

character

grouplevels

vector with length equal to number of groups

covnames

character vector of additional covariates names, one per covariate column

skip

integer number of lines to skip at start of file

Details

Comments bracketed with `/*` and `*/' will be removed automatically.

If grouplevels is specified then ngroups is taken from the number of levels (ngroups is overridden). An individual covariate is output, named according to grouplabel. The order of levels in grouplevels should match the order of the group frequency columns in the input. This also determines the ordering of levels in the resulting covariate.

See Also

RMarkInput, unRMarkInput

Examples

Run this code

datadir <- system.file('extdata', package = 'openCR')
dipperCH <- read.inp(paste0(datadir, '/ed.inp'), ngroups = 2)
summary(dipperCH)

Run the code above in your browser using DataLab