[R] dot plot by group

casperyc casperyc at hotmail.co.uk
Mon Oct 11 21:38:48 CEST 2010


Hi all,

I have the folloing data table

%%%%%%%%%%%%%%%%%%
Type	BATCH	RESPONSE
SHORT	A	22
SHORT	A	3
SHORT	A	16
SHORT	A	14
SHORT	A	8
SHORT	A	27
SHORT	A	11
SHORT	A	17
SHORT	B	12
SHORT	B	17
SHORT	B	11
SHORT	B	10
SHORT	B	16
SHORT	B	18
SHORT	B	15
SHORT	B	13
SHORT	B	9
SHORT	B	20
SHORT	C	4
SHORT	C	16
SHORT	C	32
SHORT	C	11
SHORT	C	9
SHORT	C	25
SHORT	C	27
SHORT	C	12
SHORT	C	26
SHORT	C	7
SHORT	C	14
LONG	A	12
LONG	A	7
LONG	A	19
LONG	A	19
LONG	A	11
LONG	A	33
LONG	A	20
LONG	A	25
LONG	B	24
LONG	B	6
LONG	B	39
LONG	B	14
LONG	B	17
LONG	B	10
LONG	B	22
LONG	B	35
LONG	B	33
LONG	B	21
LONG	C	15
LONG	C	11
LONG	C	17
LONG	C	8
LONG	C	2
LONG	C	10
LONG	C	16
LONG	C	21
LONG	C	9
LONG	C	19
LONG	C	23

%%%%%%%%%%%%%%%%%%

This is read into object 'd'.

I produce the dot plot by,

library(lattice)
dotplot(BATCH~RESPONSE,data=d,groups=Type)

How do I seperately plot them by 'Type'?

I have tried using
dotplot(BATCH~RESPONSE,data=d,groups=Type=="SHORT")
dotplot(BATCH~RESPONSE,data=d$Type=='SHORT')

ect

Thanks.

Casper
-- 
View this message in context: http://r.789695.n4.nabble.com/dot-plot-by-group-tp2990469p2990469.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list