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 ______________________________________________ R-help@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.