dummy {MultiObjMatch}R Documentation

This is a modified version of the function "dummy" from the R package dummies. Original code Copyright (c) 2011 Decision Patterns.

Description

Change is made to the "model.matrix" function so that the output could be used for the current package.

Usage

dummy(
  x,
  data = NULL,
  sep = "",
  drop = TRUE,
  fun = as.integer,
  verbose = FALSE,
  name = NULL
)

Arguments

x

a data.frame, matrix or single variable or variable name

data

(optional) if provided, x is the name of a column on the data

sep

(optional) the separator used between variable name and the value

drop

(optional) whether to drop unused levels

fun

(optional) function to coerce the value in the final matrix; 'as,integer' by default

verbose

(optional) whether to print the number of variables; FALSE by default

name

(optional) the column name to be selected for converting; NULL by default


[Package MultiObjMatch version 0.1.3 Index]