Skip to content

Commit

Permalink
Document new read.arff function
Browse files Browse the repository at this point in the history
  • Loading branch information
fdavidcl committed Dec 4, 2015
1 parent bb53bb1 commit e7a0748
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
30 changes: 30 additions & 0 deletions R/read.arff.R
Expand Up @@ -3,6 +3,36 @@
# different formats (MULAN/MEKA, sparse, nonsparse...)
#

#' @title 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
#' @param filename Name of the dataset
#' @param use_xml Specifies whether to use an
#' associated XML file to identify the labels. Defaults to TRUE
#' @param auto_extension Specifies whether to add
#' the '.arff' and '.xml' extensions to the filename
#' where appropriate. Defaults to TRUE
#' @param xml_file Path to the XML file. If not
#' provided, the filename ending in ".xml" will be
#' assumed
#' @param label_indices Optional vector containing the indices of the attributes
#' that should be read as labels
#' @param label_names Optional vector containing the names of the attributes
#' that should be read as labels
#' @param label_amount Optional parameter indicating the number of labels in the
#' dataset, which will be taken from the last attributes of the dataset
#' @return 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.
#' @seealso \code{\link{mldr_from_dataframe}}, \code{\link{mldr}}
#' @examples
#'
#' library(mldr)
#'\dontrun{
#' # Read "yeast.arff" and labels from "yeast.xml"
#' mymld <- read.arff("yeast")
#'}
#' @export
read.arff <- function(filename,
use_xml = TRUE,
Expand Down
54 changes: 54 additions & 0 deletions man/read.arff.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e7a0748

Please sign in to comment.