Learn R Programming

treeDA (version 0.0.5)

makeResponseMatrix: Make response matrix

Description

Create a dummy variable matrix for the response

Usage

makeResponseMatrix(response, class.names = NULL)

Arguments

response

A factor or character vector containing the classes.

class.names

A character vector giving the possible levels of the factor. If NULL, it will be generated from the levels of response.

Value

A dummy variable matrix with column names giving the class names.