Dear list members,
I am elaborating a graphic with the lattice package:
library(lattice)
data(barley)
barley
dotplot(variety ~ yield | site, data = barley, group = year, pch=c(1,
3), col=c("red", "blue"),
Here are the 3 first and the 3 last rows for the data set:
yield variety year site
1 27.00000 Manchuria 1931 University Farm
2 48.86667 Manchuria 1931 Waseca
.
.
.
.
118 35.90000 Wisconsin No. 38 1932 Crookston
119 20.66667 Wisconsin No. 38 1932 Grand Rapids
120 29.33333 Wisconsin No. 38 1932 Duluth
When I specify the pch=c(1, 3), which are a "dot" and a "+" character,
the "dot" is assigned to the year 1932 (that appear after year 1931) and
the "+" is assigned to the year 1931 (that appear first in the data
frame). Why is that? I though R should assign the first character in
the vector (pch= c(1, 3)) to the first level in the grouping variable
(year).
Thank you very much in advance.
Best,
Manuel Spínola
--
Manuel Spínola, Ph.D.
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Teléfono: 277-3598
Fax: 237-7036
_______________________________________________
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology