DMwR (version 0.4.1)

resp: Obtain the target variable values of a prediction problem

Description

This function obtains the values in the column whose name is the target variable of a prediction problem described by a formula.

Usage

resp(formula, data)

Arguments

formula
A formula describing a prediction problem
data
The data frame containing the data of the prediction problem

Value

A vector of values

References

Torgo, L. (2010) Data Mining using R: learning with case studies, CRC Press (ISBN: 9781439810187).

http://www.dcc.fc.up.pt/~ltorgo/DataMiningWithR

See Also

as.formula

Examples

Run this code
data(algae)
tgt <- resp(a1 ~ ., algae)
summary(tgt)
## Not run: 
# hist(tgt,main='Alga a1')
# ## End(Not run)

Run the code above in your browser using DataLab