Learn R Programming

SDR (version 0.7.0.0)

changeTargetVariable: Change the target Variable of a 'keel' Dataset

Description

Change the actual target variable for another one if it is categorical.

Usage

changeTargetVariable(dataset, variable)

Arguments

dataset
The KEEL dataset class
variable
The position (or the name) of the variable to set as target Variable.

Value

The dataset with the variables changed

Examples

Run this code
## Not run: 
# changeTargetVariable(carTra, 3)
# changeTargetVariable(carTra, "Doors")
# 
# Throws an error because the variable selected is numerical:
# changeTargetVariable(habermanTra, 1)
# ## End(Not run)

Run the code above in your browser using DataLab