read.arff: Read an ARFF file

Description Usage Arguments Value See Also Examples

View source: R/read.arff.R

Description

Reads a multilabel dataset from an ARFF file in Mulan or MEKA and retrieves instances distinguishing attributes corresponding to labels

Usage

1
2
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 stringsAsFactors is available

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

mldr_from_dataframe, mldr

Examples

1
2
3
4
5
6
library(mldr)
## Not run: 
# Read "yeast.arff" and labels from "yeast.xml"
mymld <- read.arff("yeast")

## End(Not run)

mldr documentation built on Jan. 11, 2020, 9:18 a.m.