[R] Want to create a histogram
Jim Lemon
jim at bitwrit.com.au
Sun Oct 20 05:29:43 CEST 2013
On 10/20/2013 11:54 AM, kannan at iitb.ac.in wrote:
> Dear All,
>
> For a report that I am writing, I need to create a histogram plot with
> x-axis fixed as very bad, bad, fair, good and very good - i.e. the order
> not changed. Can someone give me an example? For sample purposes, I am
> giving the following data: 159, 374, 3765, 11388, 6708. Thanks,
>
Hi Kannan,
You can get something that looks like what you want with these totals.
Try this:
barplot(c(159,374,3765,11388,6708),
names.arg=c("very bad","bad","fair","good","very good"))
Histograms are usually created from the raw data.
Jim
More information about the R-help
mailing list