readARFF {farff} | R Documentation |
Read ARFF file into data.frame.
Description
Implementation of a fast ARFF
parser that produces consistent results compared to the reference implementation
in RWeka. The “DATA” section is read with read_delim
.
Usage
readARFF(
path,
data.reader = "readr",
tmp.file = tempfile(),
convert.to.logicals = TRUE,
show.info = TRUE,
...
)
Arguments
path |
[ |
data.reader |
[ |
tmp.file |
[ |
convert.to.logicals |
[ |
show.info |
[ |
... |
[any]
Further parameters passed to |
Details
ARFF parsers are already available in package RWeka in read.arff
and package foreign
in read.arff
. The RWeka parser
requires Java
and rJava
, a dependency which is notoriously hard to
configure for users in R. It is also quite slow. The parser in foreign in written
in pure R, slow and not fully consistent with the reference implementation in RWeka
.
Value
[data.frame
].
Note
Integer feature columns in ARFF files are parsed as numeric columns into R.
Sparse ARFF format is currently unsupported. The function will produce an informative error message in that case.
ARFF attributes of type “relational”, e.g., for multi-instance data, are currently not supported.
Examples
path = tempfile()
writeARFF(iris, path = path)
d = readARFF(path)