The R Project SVN R

Rev

Rev 24300 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 24300 Rev 27447
1
\name{iris}
1
\name{iris}
2
\docType{data}
2
\docType{data}
3
\alias{iris}
3
\alias{iris}
4
\alias{iris3}
4
\alias{iris3}
5
\title{Edgar Anderson's Iris Data}
5
\title{Edgar Anderson's Iris Data}
6
\description{
6
\description{
7
  This famous (Fisher's or Anderson's) iris data set gives the
7
  This famous (Fisher's or Anderson's) iris data set gives the
8
  measurements in centimeters of the variables sepal length and width
8
  measurements in centimeters of the variables sepal length and width
9
  and petal length and width, respectively, for 50 flowers from each
9
  and petal length and width, respectively, for 50 flowers from each
10
  of 3 species of iris.  The species are \emph{Iris setosa},
10
  of 3 species of iris.  The species are \emph{Iris setosa},
11
  \emph{versicolor}, and \emph{virginica}.
11
  \emph{versicolor}, and \emph{virginica}.
12
}
12
}
13
\usage{
13
\usage{
14
data(iris)
14
data(iris)
15
data(iris3)
15
data(iris3)
16
}
16
}
17
\format{
17
\format{
18
  \code{iris} is a data frame with 150 cases (rows) and 5 variables
18
  \code{iris} is a data frame with 150 cases (rows) and 5 variables
19
  (columns) named \code{Sepal.Length}, \code{Sepal.Width},
19
  (columns) named \code{Sepal.Length}, \code{Sepal.Width},
20
  \code{Petal.Length}, \code{Petal.Width}, and \code{Species}.
20
  \code{Petal.Length}, \code{Petal.Width}, and \code{Species}.
21
 
21
 
22
  \code{iris3} gives the same data arranged as a 3-dimensional array
22
  \code{iris3} gives the same data arranged as a 3-dimensional array
23
  of size 50 by 4 by 3, as represented by S-PLUS.  The first dimension
23
  of size 50 by 4 by 3, as represented by S-PLUS.  The first dimension
24
  gives the case number within the species subsample, the second the
24
  gives the case number within the species subsample, the second the
25
  measurements with names \code{Sepal L.}, \code{Sepal W.},
25
  measurements with names \code{Sepal L.}, \code{Sepal W.},
26
  \code{Petal L.}, and \code{Petal W.}, and the third the species.
26
  \code{Petal L.}, and \code{Petal W.}, and the third the species.
27
}
27
}
28
\source{
28
\source{
29
  Fisher, R. A. (1936)
29
  Fisher, R. A. (1936)
30
  The use of multiple measurements in taxonomic problems.
30
  The use of multiple measurements in taxonomic problems.
31
  \emph{Annals of Eugenics},
31
  \emph{Annals of Eugenics},
32
  \bold{7}, Part II, 179--188.
32
  \bold{7}, Part II, 179--188.
33
 
33
 
34
  The data were collected by
34
  The data were collected by
35
  Anderson, Edgar (1935).
35
  Anderson, Edgar (1935).
36
  The irises of the Gaspe Peninsula,
36
  The irises of the Gaspe Peninsula,
37
  \emph{Bulletin of the American Iris Society},
37
  \emph{Bulletin of the American Iris Society},
38
  \bold{59}, 2--5.
38
  \bold{59}, 2--5.
39
}
39
}
40
\references{
40
\references{
41
  Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
41
  Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
42
  \emph{The New S Language}.
42
  \emph{The New S Language}.
43
  Wadsworth \& Brooks/Cole. (has \code{iris3} as \code{iris}.)
43
  Wadsworth \& Brooks/Cole. (has \code{iris3} as \code{iris}.)
44
}
44
}
-
 
45
\seealso{
45
\seealso{\code{\link{matplot}} some examples of which use \code{iris}.}
46
  \code{\link[graphics]{matplot}} some examples of which use
-
 
47
  \code{iris}.
-
 
48
}
46
\examples{
49
\examples{
47
data(iris3)
50
data(iris3)
48
dni3 <- dimnames(iris3)
51
dni3 <- dimnames(iris3)
49
ii <- data.frame(matrix(aperm(iris3, c(1,3,2)), ncol=4,
52
ii <- data.frame(matrix(aperm(iris3, c(1,3,2)), ncol=4,
50
                   dimnames=list(NULL, sub(" L.",".Length",
53
                   dimnames=list(NULL, sub(" L.",".Length",
51
                                           sub(" W.",".Width", dni3[[2]])))),
54
                                           sub(" W.",".Width", dni3[[2]])))),
52
                 Species = gl(3,50,lab=sub("S","s",sub("V","v",dni3[[3]]))))
55
                 Species = gl(3,50,lab=sub("S","s",sub("V","v",dni3[[3]]))))
53
data(iris)
56
data(iris)
54
all.equal(ii, iris) # TRUE
57
all.equal(ii, iris) # TRUE
55
}
58
}
56
\keyword{datasets}
59
\keyword{datasets}