Skip to contents

Create dummy variable

Usage

dummy_var(dat, project, DumFill = 1, name = "dummy_var")

Arguments

dat

Primary data containing information on hauls or trips. Table in the FishSET database contains the string 'MainDataTable'.

project

Project name.

DumFill

Fill the dummy variable with 1 or 0

name

String, name of created dummy variable. Defaults to name of the function if not defined.

Value

Primary dataset with dummy variable added.

Details

Creates a dummy variable of either 0 or 1 with length of the number of rows of the data set.

Examples

if (FALSE) {
pollockMainDataTable <- dummy_var(pollockMainDataTable, 'pollock', DumFill=1, 'dummyvar')
}