Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/r-utility-make-formula.R
This function creates a formula object for R modeling with a given target attribute name and a set of input attribute names. It is used in examples presented in the book Cichosz, P. (2015): Data Mining Algorithms: Explained Using R. See Appendix B or http://www.wiley.com/go/data_mining_algorithms for more details.
1 |
y.var |
a character string specifying the target attribute name |
x.vars |
a character vector specifying the set of input attribute names |
The x.vars
argument can be also "."
, specifying that all
non-target attributes should be used as input attributes. Only simple single-attribute terms
combined using the +
operator are used in the created formula.
A formula y~x1+x2+...
where y
denotes the target
attribute name and x1, x2, ...
denote the input attribute names,
or y~.
if x.vars=="."
.
Pawel Cichosz <p.cichosz@elka.pw.edu.pl>
1 2 3 4 | data(weather, package="dmr.data")
make.formula(names(weather)[5], names(weather)[1:3])
make.formula(names(weather)[5], ".")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.