resp: Obtain the target variable values of a prediction problem

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/utils.R

Description

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

Usage

1

Arguments

formula

A formula describing a prediction problem

data

The data frame containing the data of the prediction problem

Value

A vector of values

Author(s)

Luis Torgo ltorgo@dcc.fc.up.pt

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

1
2
3
4
5
6
7
data(algae)
tgt <- resp(a1 ~ ., algae)
summary(tgt)
## Not run: 
hist(tgt,main='Alga a1')

## End(Not run)

Example output

Loading required package: lattice
Loading required package: grid
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   0.00    1.40    4.85   15.32   19.32   89.80 

DMwR documentation built on May 1, 2019, 9:17 p.m.