Apollo
Apollo

Reputation: 9064

Treatment control graph in R

How would I create a treatment/control graph like in R, assuming I have two vectors of data

treatment <- c(1,2,3,3,5,6,7)

control <- c(4,5,6,6,8,9,10)

enter image description here

Upvotes: 0

Views: 133

Answers (1)

MrFlick
MrFlick

Reputation: 206253

If you use the lattice package, you should use something like

library(lattice)
xyplot(data~which, make.groups(treatment, control), groups=which)

enter image description here

Upvotes: 3

Related Questions