read_inp: Read capture-recapture data with Input (.inp) format used by...

View source: R/read_inp.R

read_inpR Documentation

Read capture-recapture data with Input (.inp) format used by program MARK

Description

This function reads in capture-recapture dataset with the Input format. It is a wrapper for the function convert.inp from package RMark. It drops continuous covariates because no goodness-of-fit test exists for such models

Usage

read_inp(file, group.df = NULL)

Arguments

file

text file with Input format (extension .inp)

group.df

dataframe with grouping variables; contains a row for each group defined in the input file row1=group1, row2=group2 etc. Names and number of columns in the dataframe is set by user to define grouping variables in RMark dataframe

Value

list with first component the matrix of encounter histories, second components the vector of number of individuals with corresponding histories and, if relevant, third component vector/matrix with group(s)

Author(s)

Olivier Gimenez <olivier.gimenez@cefe.cnrs.fr>

Examples

# read in Dipper dataset
dipper = system.file("extdata", "ed.inp", package = "R2ucare")
read_inp(dipper,group.df=data.frame(sex=c('Male','Female')))
# read in Geese dataset
geese = system.file("extdata", "geese.inp", package = "R2ucare")
read_inp(geese)

R2ucare documentation built on July 11, 2022, 9:06 a.m.