[R] how to make a histogram with percentage on top of each bar?
arun
smartpink111 at yahoo.com
Thu Jun 21 22:51:53 CEST 2012
HI,
Probably this link will be useful to you (http://stackoverflow.com/questions/9317948/how-to-label-histogram-bars-with-data-values-or-percents-in-r).
A.K>
----- Original Message -----
From: york8866 <yu_york at hotmail.com>
To: r-help at r-project.org
Cc:
Sent: Thursday, June 21, 2012 1:26 PM
Subject: [R] how to make a histogram with percentage on top of each bar?
I have a dataset like the following:
ID DV
1 0.868576818
2 0.337120116
3 0.029233775
4 0.719783525
5 0.976631182
6 0.672941605
7 0.13239462
8 0.99936475
9 0.91540604
10 0.545686514
to get a histogram with y axis as percentage, I wrote the following code"
library(lattice)
histogram(data)
now , how to input the percentage and cumulative percentage on top of each
bar?
thanks,
--
View this message in context: http://r.789695.n4.nabble.com/how-to-make-a-histogram-with-percentage-on-top-of-each-bar-tp4634131.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
R-help at 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.
More information about the R-help
mailing list