Skip to content
Prev 243676 / 398513 Next

draw categorical histogram

Phoebe,

In addition to the barplot method below, you really can use plot() to  
draw what it sounds like you are looking for IF you have a categorical  
variable.  To illustrate, try running the following code:

x=sample(c("Richard", "Minnie", "Albert", "Helen", "Joe", "Kingston"),  
50, replace=T)
x=as.factor(x)
plot(x)

See also ?plot.factor

Andrew Miles
On Dec 1, 2010, at 4:06 PM, Jorge Ivan Velez wrote: