[R] histogram with NAs
darteta001 at ikasle.ehu.es
darteta001 at ikasle.ehu.es
Fri Jan 18 16:49:42 CET 2008
Dear list,
I have a categorical variable in a data.frame that I would like to
plot using a histogram to show number of events. Values are 0, 1 and
some NAs. I can´t make the hist() function to
1) include a column with the number of NAs
2) have the x axis to be categorical, I always get 0, 0.2, 0.4,... 1
divisions
Can anyone help me?
This is my code. "database" is my data.frame and "Event" is my
variable.
attach(database)
hist(Event, col = 2, main = "Number of Events"))
Thanks in advance,
David
More information about the R-help
mailing list