[R] Barplot - Can't figure it out
Kevin Wang
Kevin.Wang at maths.anu.edu.au
Fri Feb 18 06:25:22 CET 2005
Hi,
T Petersen wrote:
> Hi,
>
> I have two catagorical vectors like this;
>
> x = c(1, 2, 4, 2, 1)
> y = c(2, 4, 2 ,4, 1)
>
> I want to set up a barplot with the catagories 1-4 horizontally and
> number of occurances vertically for each vector x,y. I've tried
>
> boxplot(table(x,y), beside=T)
>
> and
>
> boxplot(c(x,y), beside=T)
Have you tried barplot(), instead of boxplot()???
Cheers,
Kev
--
Ko-Kang Kevin Wang
PhD Student
Centre for Mathematics and its Applications
Building 27, Room 1004
Mathematical Sciences Institute (MSI)
Australian National University
Canberra, ACT 0200
Australia
Homepage: http://wwwmaths.anu.edu.au/~wangk/
Ph (W): +61-2-6125-2431
Ph (H): +61-2-6125-7407
Ph (M): +61-40-451-8301
More information about the R-help
mailing list