Format the CRC data

Description

Put a CRC dataset into a standard form that is understood by functions like lllcrc.

Usage

1
formatdata(x, y, cont.vars = NULL, categ.vars = NULL)

Arguments

x

The data frame of CRC data, such as the output of the simulation function poptop.

y

A character string indicating which column of x contains the capture patterns.

cont.vars

A character vector of variable names for continuous variables.

categ.vars

A character vector of variable names for categorical variables.

Value

A data frame that is an expanded version of the argument x. Variables are renamed using an "x.con...." or "x.dis...." for continuous and discrete variables, respectively. Each discrete/categorical variable with L levels is expanded into L separate binary variables. Several attributes are included to describe the data format.

Author(s)

Zach Kurtz

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.