37 lines
1.5 KiB
Plaintext
37 lines
1.5 KiB
Plaintext
|
|
R version 2.5.0 Under development (unstable) (2007-03-25 r40887)
|
|
Copyright (C) 2007 The R Foundation for Statistical Computing
|
|
ISBN 3-900051-07-0
|
|
|
|
R is free software and comes with ABSOLUTELY NO WARRANTY.
|
|
You are welcome to redistribute it under certain conditions.
|
|
Type 'license()' or 'licence()' for distribution details.
|
|
|
|
R is a collaborative project with many contributors.
|
|
Type 'contributors()' for more information and
|
|
'citation()' on how to cite R or R packages in publications.
|
|
|
|
Type 'demo()' for some demos, 'help()' for on-line help, or
|
|
'help.start()' for an HTML browser interface to help.
|
|
Type 'q()' to quit R.
|
|
|
|
> library("foreign")
|
|
> df <- read.arff("contact-lenses.arff")
|
|
> summary(df)
|
|
age spectacle-prescrip astigmatism tear-prod-rate
|
|
pre-presbyopic:8 hypermetrope:12 no :12 normal :12
|
|
presbyopic :8 myope :12 yes:12 reduced:12
|
|
young :8
|
|
contact-lenses
|
|
hard: 4
|
|
none:15
|
|
soft: 5
|
|
> str(df)
|
|
'data.frame': 24 obs. of 5 variables:
|
|
$ age : Factor w/ 3 levels "pre-presbyopic",..: 3 3 3 3 3 3 3 3 1 1 ...
|
|
$ spectacle-prescrip: Factor w/ 2 levels "hypermetrope",..: 2 2 2 2 1 1 1 1 2 2 ...
|
|
$ astigmatism : Factor w/ 2 levels "no","yes": 1 1 2 2 1 1 2 2 1 1 ...
|
|
$ tear-prod-rate : Factor w/ 2 levels "normal","reduced": 2 1 2 1 2 1 2 1 2 1 ...
|
|
$ contact-lenses : Factor w/ 3 levels "hard","none",..: 2 3 2 1 2 3 2 1 2 3 ...
|
|
> q()
|