| read.arff {mldr} | R Documentation |
Read an ARFF file
Description
Reads a multilabel dataset from an ARFF file in Mulan or MEKA and retrieves instances distinguishing attributes corresponding to labels
Usage
read.arff(filename, use_xml = TRUE, auto_extension = TRUE, xml_file,
label_indices, label_names, label_amount, ...)
Arguments
filename |
Name of the dataset |
use_xml |
Specifies whether to use an associated XML file to identify the labels. Defaults to TRUE |
auto_extension |
Specifies whether to add the '.arff' and '.xml' extensions to the filename where appropriate. Defaults to TRUE |
xml_file |
Path to the XML file. If not provided, the filename ending in ".xml" will be assumed |
label_indices |
Optional vector containing the indices of the attributes that should be read as labels |
label_names |
Optional vector containing the names of the attributes that should be read as labels |
label_amount |
Optional parameter indicating the number of labels in the dataset, which will be taken from the last attributes of the dataset |
... |
Extra parameters that will be passed to the parsers. Currently
only the option |
Value
A list containing four members: dataframe containing the dataset,
labelIndices specifying the indices of the attributes that correspond to
labels, attributes containing name and type of each attribute and name of
the dataset.
See Also
Examples
library(mldr)
## Not run:
# Read "yeast.arff" and labels from "yeast.xml"
mymld <- read.arff("yeast")
## End(Not run)