[R] Change in lattice dotplot?
Fredrik Karlsson
dargosch at gmail.com
Tue Apr 11 23:00:00 CEST 2006
Dear list,
I used to have this code in a Sweave document:
sel <- placeDF$Place == "Velar" & placeDF$manner == "Plosive"
table(placeDF$agem[sel], placeDF$place[sel]) -> pd
print(
dotplot(
prop.table(pd,margin=1),
auto.key=list(
space="right"
),
xlab="Relative Frequency",
ylab="Age (months)",
stack=T,
par.settings = list(superpose.fill = list(col =
rev(gray.colors(40)[1:40 %% 4 == 1] )))
)
)
This used ot produce a dotplot with the proportion of each value in pd
relative to the entire row. Each column constituted a separate group.
Now, with an ugrade of all packages, I have lost the groups.
Is there a way to get them back?
(The pd table displayed below)
/Fredrik
> pd
Labial Dental Alveolar Postalveolar Retroflex Palatal Velar Uvular
18 0 1 0 0 0 0 10 0
19 1 1 0 0 0 0 9 0
20 0 3 0 0 0 0 11 0
21 1 3 0 0 0 0 17 0
22 0 0 0 0 0 0 8 0
23 0 9 0 0 0 0 32 0
24 0 2 0 0 0 0 20 0
25 1 1 0 0 0 0 28 0
26 1 7 0 0 1 0 37 0
27 2 7 0 0 1 0 35 0
28 0 3 0 0 0 0 32 0
29 0 4 0 0 3 0 29 0
30 4 10 0 0 1 0 30 0
31 0 6 0 0 1 0 14 0
32 2 2 0 0 0 0 18 0
33 0 13 0 0 2 0 26 0
34 0 2 0 0 1 0 28 0
35 2 1 0 0 0 0 25 0
36 0 3 0 0 0 0 10 0
37 0 1 0 0 1 0 14 0
38 0 2 0 0 0 0 6 0
39 0 2 0 0 0 0 7 0
40 0 0 0 0 2 0 14 0
41 1 2 0 0 1 0 10 0
42 1 0 0 0 1 0 12 0
43 0 1 0 0 1 0 13 0
44 0 1 0 0 1 0 8 0
45 0 0 0 0 1 0 11 0
46 0 0 0 0 2 0 5 0
47 0 2 0 0 4 0 9 0
48 0 0 0 0 2 0 7 0
49 0 0 0 0 2 0 5 0
50 0 0 0 0 0 0 8 0
51 0 0 0 0 1 0 7 0
>
More information about the R-help
mailing list