[R] stripchart
John Kane
jrkrideau at yahoo.ca
Tue Jan 22 21:32:13 CET 2008
Have a look at stripplot in lattice. I think it may do
what you want if you cbind e & f and then create an
identifier to plot against.
e <- c(17358865 , 17966995 , 21306539 , 27880531,
34166504, 36111044, 36266288,
36854306 , 43786190 , 44322336 , 45529444, 46302360,
53479132, 58567262,
60564442 , 72637088 , 79875476 , 93155112, 94372260,
96643396, 103123936,
116908456, 131781664, 132968364, 135945080, 141788832,
149924864, 156539568,
157817896, 162399496, 168344072, 173146584, 176302744,
182878168, 183946152,
185068720, 190791232, NA )
f <- c(17906353, 21295547, 27880531, 34118702 ,
35395488, 36132622 , 37916920,
43786190, 44322336, 46302360, 53494622 , 62105336,
63817440 , 72637088 ,
79875476, 94545992 , 96506368, 103123936 ,116908456,
126190072, 127446552 ,
131781664, 154658264 ,176302744, 181670472, 182625272,
182878168, 183946152,
NA )
ec <- rep("ee", length(e))
fc <- rep("ff", length(f))
bb <- data.frame(c(ec,fc),c(e,f))
stripplot(bb[,2]~bb[,1])
--- mohamed nur anisah <nuranisah_mohamed at yahoo.com>
wrote:
> hi,
>
> I want to plot a dotplot graph but unfortunately R
> does not have it any more. It suggest to use either
> the stripchart or the dotchart and i prefer to play
> around with the stripchart graph. Sadly, the result
> is not like i want where I'm actually wants the
> plots/points were scattered around the x-axis. Plus,
> from the results shows that and the x-axis gave a
> very large scale, i.e 5.0e+0.7. How am i going to
> change this scale and to change the colour or
> symbols where i can show the difference of the
> sample data. Any suggestion??
>
> two sample data:
> e
> [1] 17358865 17966995 21306539 27880531
> 34166504 36111044 36266288
> [8] 36854306 43786190 44322336 45529444
> 46302360 53479132 58567262
> [15] 60564442 72637088 79875476 93155112
> 94372260 96643396 103123936
> [22] 116908456 131781664 132968364 135945080
> 141788832 149924864 156539568
> [29] 157817896 162399496 168344072 173146584
> 176302744 182878168 183946152
> [36] 185068720 190791232 NA
> > f
> [1] 17906353 21295547 27880531 34118702
> 35395488 36132622 37916920
> [8] 43786190 44322336 46302360 53494622
> 62105336 63817440 72637088
> [15] 79875476 94545992 96506368 103123936
> 116908456 126190072 127446552
> [22] 131781664 154658264 176302744 181670472
> 182625272 182878168 183946152
> [29] NA
>
> R-command:
>
>
>
stripchart(e,method="stack",col="green",add=F,at=0.0)
>
> stripchart(f,method="stack",col="blue",add=T,at=0.0)
>
>
> Thanks in advance.
>
> Cheers,
> Anisah
>
>
> ---------------------------------
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained,
> reproducible code.
>
More information about the R-help
mailing list