Re: [R] Non-Numeric Histograms

From: Uwe Ligges <>
Date: Sun 09 Jul 2006 - 00:53:10 EST

justin rapp wrote:
> I have a dataset with a variable that is non-numeric. I was wondering
> if there is an easy way in R to create a bar graph that will tell me
> how many of each level of this non-numeric variable are in the overall
> dataset.
> Specifically, if my variable is LETTER, and I have A, B,C, D, E, F and
> I want to find out how many of each letter there are, what is the
> easiest way to do this in R and use the information to make a plot?

  barplot(table(c("A", "A", "B")))

Uwe Ligges

> jdr
> ______________________________________________
> mailing list
> PLEASE do read the posting guide! mailing list PLEASE do read the posting guide! Received on Sun Jul 09 00:56:13 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 09 Jul 2006 - 02:19:03 EST.

Mailing list information is available at Please read the posting guide before posting to the list.