read.arff: Read Data from ARFF Files

Description Usage Arguments Value References See Also Examples

View source: R/readers.R


Reads data from Weka Attribute-Relation File Format (ARFF) files.





a character string with the name of the ARFF file to read from, or a connection which will be opened if necessary, and if so closed at the end of the function call.


A data frame containing the data from the ARFF file.


Attribute-Relation File Format

See Also



read.arff(system.file("arff", "contact-lenses.arff",
                      package = "RWeka"))

Example output

OpenJDK 64-Bit Server VM warning: Can't detect initial thread stack location - find_vma failed
              age spectacle-prescrip astigmatism tear-prod-rate contact-lenses
1           young              myope          no        reduced           none
2           young              myope          no         normal           soft
3           young              myope         yes        reduced           none
4           young              myope         yes         normal           hard
5           young       hypermetrope          no        reduced           none
6           young       hypermetrope          no         normal           soft
7           young       hypermetrope         yes        reduced           none
8           young       hypermetrope         yes         normal           hard
9  pre-presbyopic              myope          no        reduced           none
10 pre-presbyopic              myope          no         normal           soft
11 pre-presbyopic              myope         yes        reduced           none
12 pre-presbyopic              myope         yes         normal           hard
13 pre-presbyopic       hypermetrope          no        reduced           none
14 pre-presbyopic       hypermetrope          no         normal           soft
15 pre-presbyopic       hypermetrope         yes        reduced           none
16 pre-presbyopic       hypermetrope         yes         normal           none
17     presbyopic              myope          no        reduced           none
18     presbyopic              myope          no         normal           none
19     presbyopic              myope         yes        reduced           none
20     presbyopic              myope         yes         normal           hard
21     presbyopic       hypermetrope          no        reduced           none
22     presbyopic       hypermetrope          no         normal           soft
23     presbyopic       hypermetrope         yes        reduced           none
24     presbyopic       hypermetrope         yes         normal           none
Warning message:
system call failed: Cannot allocate memory 

RWeka documentation built on Nov. 16, 2021, 5:07 p.m.