[R] dot chart adding group labels....HELP

Peter Ehlers ehlers at ucalgary.ca
Mon Feb 28 22:24:14 CET 2011


On 2011-02-28 12:31, Jannis wrote:
> No idea what this dotchart is actually meant to visualize but naming the
> columns of the data matrix gives you names for your groups which are
> also used to label the plot.
>
> ?dimnames
> ?colnames
>
>
> HTH
> Jannis

I think that David might need to assign row names.
@ David:
   Please do provide *reproducible* code to illustrate your problem.

Peter Ehlers

>
> On 02/28/2011 06:13 PM, David Lyon wrote:
>> HI everyone
>>
>>
>> Does anayone know how to add group labels to dot charts
>>>  From the R code below
>>
>>
>> a<-read.table("test2", sep="\t", header=TRUE)
>> dotchart(as.matrix(t()), main="test")
>>
>>
>> it generates from the datafile input below,
>>
>> file test2 containing:
>> A	B	C	D	E
>> 1	1	1	1	0.2068594
>> 1	0.2386699	1	1	0.3959740
>> 1	0.3965243	1	1	1.0000000
>> 1	1.0000000	1	1	0.3329179
>> 1	1.0000000	1	1	0.4873605
>>
>>
>> It gives by default the group labels "1","2","3","4" and "5"
>>
>> How do I change the group labels from the default "1","2","3","4" and "5" to something more useful say "place1","place2", "place3", "place4", "place5"
>>
>> A BIG thanks in advance!
>>
>> ______________________________________________
>> 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.
>>
>
> ______________________________________________
> 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