<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1499876498162_24443"><span id="yui_3_16_0_ym19_1_1499876498162_24444">Prezados, boa tarde!!! </span></div><div id="yui_3_16_0_ym19_1_1499876498162_24443"><span><br></span></div><div id="yui_3_16_0_ym19_1_1499876498162_24443"><span id="yui_3_16_0_ym19_1_1499876498162_24636">Estou empregando </span>a library "lattice" para construir alguns histogramas, como no exemplo abaixo:</div><div id="yui_3_16_0_ym19_1_1499876498162_24443"><span style="font-family: "Courier New", courier, monaco, monospace, sans-serif; font-size: small;"><br></span></div><div id="yui_3_16_0_ym19_1_1499876498162_24443"><font size="2" id="yui_3_16_0_ym19_1_1499876498162_25750" color="#cd232c"><span style="font-family: "Courier New", courier, monaco, monospace, sans-serif;" id="yui_3_16_0_ym19_1_1499876498162_25749">###dados</span><br></font></div><div id="yui_3_16_0_ym19_1_1499876498162_24443"><div id="yui_3_16_0_ym19_1_1499876498162_24864"><font face="Courier New, courier, monaco, monospace, sans-serif" id="yui_3_16_0_ym19_1_1499876498162_25520" size="2" color="#cd232c"><div id="yui_3_16_0_ym19_1_1499876498162_25564"><br></div><div id="yui_3_16_0_ym19_1_1499876498162_25564">res=c(rnorm(1000,20,2),rnorm(1000,15,1.5),rnorm(1000,25,2.5),rnorm(1000,25,2.5))<br></div><div id="yui_3_16_0_ym19_1_1499876498162_25567"><br id="yui_3_16_0_ym19_1_1499876498162_25568"></div><div id="yui_3_16_0_ym19_1_1499876498162_25569">###fatores</div><div id="yui_3_16_0_ym19_1_1499876498162_25570"><br></div><div id="yui_3_16_0_ym19_1_1499876498162_25570">fac=c(rep("F1",1000),rep("F2",1000),rep("F3",1000),rep("F4",1000))<br></div><div id="yui_3_16_0_ym19_1_1499876498162_25573">fac=factor(fac,levels=c("F1","F2","F3","F4"),labels=c("F1","F2","F3","F4"))</div><div id="yui_3_16_0_ym19_1_1499876498162_25574"><br id="yui_3_16_0_ym19_1_1499876498162_25575"></div><div id="yui_3_16_0_ym19_1_1499876498162_25576">###gráfico em lattice</div><div id="yui_3_16_0_ym19_1_1499876498162_25577"><br></div><div id="yui_3_16_0_ym19_1_1499876498162_25577">require(lattice)<br></div><div id="yui_3_16_0_ym19_1_1499876498162_25580">histogram(</div><div id="yui_3_16_0_ym19_1_1499876498162_25581">~res|fac,</div><div id="yui_3_16_0_ym19_1_1499876498162_25582">xlab="Resultado",</div><div id="yui_3_16_0_ym19_1_1499876498162_25583">ylab="Freqüência",</div><div id="yui_3_16_0_ym19_1_1499876498162_25584">type=c("count"),</div><div id="yui_3_16_0_ym19_1_1499876498162_25585">layout=c(1,4),</div><div id="yui_3_16_0_ym19_1_1499876498162_25586">endpoints=c(0,40),</div><div id="yui_3_16_0_ym19_1_1499876498162_25587">nint=30,</div><div id="yui_3_16_0_ym19_1_1499876498162_25588">scales=list(x=list(at=c(0,10,20,30,40))),</div><div id="yui_3_16_0_ym19_1_1499876498162_25589">panel = function(x, ...) </div><div id="yui_3_16_0_ym19_1_1499876498162_25590">{ </div><div id="yui_3_16_0_ym19_1_1499876498162_25591">panel.histogram(x,col=rgb(62,88,172,max=255),...) </div><div id="yui_3_16_0_ym19_1_1499876498162_25592">panel.abline(v=20,col=rgb(13,141,70,max=255),lwd=2)</div><div id="yui_3_16_0_ym19_1_1499876498162_25593">} </div><div dir="ltr" id="yui_3_16_0_ym19_1_1499876498162_25594">)</div></font></div><div id="yui_3_16_0_ym19_1_1499876498162_24864"><br></div></div><div id="yui_3_16_0_ym19_1_1499876498162_24447"><span id="yui_3_16_0_ym19_1_1499876498162_24448">Alguém sabe como fazer para inserir a curva normal no gráfico do histograma, quando se tem no eixo y a frequência ("count") em vez da densidade ("density")?</span></div><div id="yui_3_16_0_ym19_1_1499876498162_24447"><br></div><div id="yui_3_16_0_ym19_1_1499876498162_24447">Obrigado,</div><div id="yui_3_16_0_ym19_1_1499876498162_24447"> </div><div class="signature" id="yui_3_16_0_ym19_1_1499876498162_24379"><div class="MsoNormal" id="yui_3_16_0_1_1497025264182_38349" style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;"><i id="yui_3_16_0_1_1497025264182_38508"><span id="yui_3_16_0_1_1497025264182_38507" style="color:rgb(0, 0, 191);font-size:medium;"><font face="Courier New, courier, monaco, monospace, sans-serif">Diogo Jerônimo</font></span></i></div><div class="MsoNormal" id="yui_3_16_0_1_1497025264182_38347" style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;"><i id="yui_3_16_0_1_1497025264182_38430"><span id="yui_3_16_0_1_1497025264182_38429" style="color:rgb(0, 0, 191);font-size:medium;"><font face="Courier New, courier, monaco, monospace, sans-serif" id="yui_3_16_0_ym19_1_1499876498162_24482">Bacharel em Ciências Estatísticas - ENCE/IBGE</font></span></i></div><div class="MsoNormal" id="yui_3_16_0_1_1497025264182_38310" style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;"><i id="yui_3_16_0_1_1497025264182_38309"><span id="yui_3_16_0_1_1497025264182_38308" style="color:rgb(0, 0, 191);font-size:medium;"><font face="Courier New, courier, monaco, monospace, sans-serif" id="yui_3_16_0_ym19_1_1499876498162_24420">Mestre em Metrologia - PUC-Rio/PósMQI</font></span></i></div><div class="MsoNormal" id="yui_3_16_0_1_1497025264182_38326" style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;"><i id="yui_3_16_0_1_1497025264182_38329"><span id="yui_3_16_0_1_1497025264182_38328" style="color:rgb(0, 0, 191);font-size:medium;"><font face="Courier New, courier, monaco, monospace, sans-serif" id="yui_3_16_0_1_1497025264182_38700">CONRE: 8514 - SÉRIE A</font></span></i></div><div class="MsoNormal" id="yui_3_16_0_1_1497025264182_38326" style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;"><i id="yui_3_16_0_1_1497025264182_38314"><span id="yui_3_16_0_1_1497025264182_38313" style="color:rgb(0, 0, 191);font-size:medium;"><font face="Courier New, courier, monaco, monospace, sans-serif" id="yui_3_16_0_1_1497025264182_38698">Cel:(21)99680-8535</font></span></i></div><div class="MsoNormal" id="yui_3_16_0_1_1497025264182_38319" style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;"><i id="yui_3_16_0_1_1497025264182_38318"><span id="yui_3_16_0_1_1497025264182_38317" style="color:rgb(0, 0, 191);font-size:medium;"><font face="Courier New, courier, monaco, monospace, sans-serif" id="yui_3_16_0_1_1497025264182_38696">Email: diogojose21@yahoo.com.br</font></span></i></div><div class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;background:white;" id="yui_3_16_0_ym19_1_1499876498162_24386"><i id="yui_3_16_0_1_1497025264182_38323"><span id="yui_3_16_0_1_1497025264182_38322" style="line-height:17.12px;color:rgb(0, 0, 191);font-size:medium;"><font face="Courier New, courier, monaco, monospace, sans-serif" id="yui_3_16_0_1_1497025264182_38695">http://lattes.cnpq.br/8996149312896520</font></span></i></div></div><div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1499876498162_24391" style="display: block;"> <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1499876498162_24390"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1499876498162_24389"> <div dir="ltr" id="yui_3_16_0_ym19_1_1499876498162_24388"><br></div><div class="y_msg_container" id="yui_3_16_0_ym19_1_1499876498162_24395"><div id="yiv8611411500"><div id="yui_3_16_0_ym19_1_1499876498162_24398"><div style="color:#000;background-color:#fff;font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;" id="yui_3_16_0_ym19_1_1499876498162_24397"><div class="yiv8611411500signature" id="yiv8611411500yui_3_16_0_ym19_1_1490959058821_36799"><div id="yiv8611411500yui_3_16_0_ym19_1_1490959058821_36806"><br></div></div></div></div></div></div> </div> </div> </div></div></body></html>