Ben Bolker
Sat, 18 Dec 2010 07:07:24 -0800
David Winsemius <dwinsemius <at> comcast.net> writes:
On Dec 18, 2010, at 7:01 AM, e-letter wrote:
Readers,
I am trying to use the function dotchart. The data is:
category values1 values2 values3 values4
1 a 10 27 56 709
2 b 4 46 47 208
3 c 5 17 18 109
4 d 6 50 49 308
The following error occurs
dotchart(testdot,groups=testdot[,2])
Error in dotchart(testdot, labels = testdot[, 1], groups = testdot[,
2]) :
'x' must be a numeric vector or matrix
According to my understanding (clearly wrong!) of the documentation
for dotchart (accessed from the manual in section 'graphics'), columns
of data can be selected by 'groups' for subsequent plotting.
Following up on David's response:
d <- read.table(textConnection("category values1 values2 values3 values4
1 a 10 27 56 709
2 b 4 46 47 208
3 c 5 17 18 109
4 d 6 50 49 308"),
header=TRUE)
## Something like this is probably as close as you can get with
## stock 'dotchart' -- it does *not* (as far as I can tell) put
## different points on the same line, just groups lines