formatdata: Format the CRC data

Description Usage Arguments Value Author(s)

View source: R/design.R

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


lllcrc documentation built on May 20, 2017, 4:45 a.m.

Search within the lllcrc package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.