[R] Histogram for grouped data in R
Mendiburu, Felipe (CIP)
F.MENDIBURU at CGIAR.ORG
Sun Jan 25 18:58:38 CET 2009
Ok,
use library agricolae, graph.freq() is similar hist(), aditional parameters
size<- c(0,10,20,50,100)
f<-c(15,25,10,5)
library(agricolae)
h<-graph.freq(size,counts=f,axes=F)
axis(1,x)
axis(2,seq(0,30,5))
Other function:
# is necesary histogram h with hist() or graph.freq()
h<-graph.freq(x,counts=f,axes=F)
axis(1,x)
normal.freq(h,col="red")
table.freq(h)
ojiva.freq(h,type="b",col="blue")
Regards,
Felipe de Mendiburu
http://tarwi.lamolina.edu.pe/~fmendiburu
________________________________
From: r-help-bounces at r-project.org on behalf of darthgervais
Sent: Fri 1/23/2009 8:55 AM
To: r-help at r-project.org
Subject: [R] Histogram for grouped data in R
I have grouped data in this format
Size -- Count
0-10 -- 15
10-20 -- 25
20-50 -- 10
50-100 -- 5
I've been trying to find a way to set this up with the proper histogram
heights, but can't seem to figure it out. So any help would be much
appreciated!
--
View this message in context: http://www.nabble.com/Histogram-for-grouped-data-in-R-tp21624806p21624806.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