[R] plot: want only dots

Hermann Norpois hnorpois at gmail.com
Tue Oct 15 16:23:47 CEST 2013


Hello,

I would like to plot some values referring to the genotype (which is 0,1
and 2).  My data is organised like this:

head (df)
  Genotype          z
1        0 0.07029379
2        0 2.15739115
3        0 0.51395897
4        0 0.48733029
5        0 0.15584074
6        0 0.27755294

I tried:
> plot (df)
And.
> plot (z ~ Genotype, data=df)

But it is always the same. As demonstrated in the attachment there are bars
with mean etc... But I want dots only. How does this work?

Thanks
Hermann

> dput (df)
structure(list(Genotype = structure(c(1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L), .Label = c("0",
"1", "2"), class = "factor"), z = c(0.0702937908415368, 2.15739115226985,
0.513958971085714, 0.487330287677455, 0.155840743875606, 0.277552938739661,
0.507384510251828, 9.25159831317385e-05, 0.420814150642641,
10.628270981371,
0.518650521289299, 0.644448203670876, 0.133539811585953, 0.248985608185673,
0.152636019877717, 0.00964805339859479, 7.57036184259711e-05,
0.649435257991169, 0.38951827610564, 75.6011068681301)), .Names =
c("Genotype",
"z"), row.names = c(NA, 20L), class = "data.frame")
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zzz.png
Type: image/png
Size: 3771 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20131015/cb40553a/attachment.png>


More information about the R-help mailing list