Data Mining Algorithms In R/Packages/RWeka/Weka converters

From Wikibooks, open books for an open world
Jump to: navigation, search

Description[edit]

R interfaces to Weka file loaders and savers.

Usage[edit]

C45Loader(file)

XRFFLoader(file)

C45Saver(x, file, control = NULL)

XRFFSaver(x, file, control = NULL)

Arguments[edit]

file, a non-empty character string naming a file to read from or write to.

x, the data to be written, preferably a matrix or data frame. If not, coercion to a data frame is attempted.

control, an object of class Weka_control, or a character vector of control options, or NULL (default).

Details[edit]

C45Loader and C45Saver use the format employed by the C4.5 algorithm/software, where data is stored in two separate ‘.names’ and ‘.data’ files.

XRFFLoader and XRFFSaver handle XRFF (eXtensible attribute-Relation File Format, an XMLbased extension of Weka’s native Attribute-Relation File Format) files.

Value[edit]

Invisibly NULL for the savers.

A data frame containing the data from the given file for the loaders.