<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">Daniel, muito obrigado. A ideia é ótima. Vou fazer aqui.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">Muito obrigado!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em ter., 2 de fev. de 2021 às 17:47, Daniel Guimarães Tiezzi <<a href="mailto:dtiezzi@usp.br">dtiezzi@usp.br</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Vc teria que apresentar algo assim então:<div><br></div><div><img id="gmail-m_-280750926547078180821D6B8B5-62E9-43F6-BD5A-ED9AE82F2DE6" src="cid:1776d7578586ae9a9121"></div><div><br></div><div><div>png("mybarchart.png", width = 12, height = 8, units = 'in', res = 300)</div><div>par(mar=c(5.1, 4.1, 4.1, 6.1), xpd=TRUE)</div><div>barplot(t(as.matrix(df[-nrow(df),c(-1,-6)])), col = c('cornflowerblue', "hotpink", 'lightgoldenrodyellow', 'aquamarine3'), space = 0, ylim = c(0,30000), border = NA, xlab = 'Mês')</div><div>lines(seq(0.5,11.5),df$`2020`[-13], col = 'red', lwd = 3)</div><div>points(seq(0.5,11.5),df$`2020`[-13], col = 'red', cex = 1.45, pch = '+')</div><div>legend("topright", inset=c(-0.1,0), legend=c(colnames(df)[-1]), title="Ano", pch = c(15,15,15,15,3), col = c('cornflowerblue', "hotpink", 'lightgoldenrodyellow', 'aquamarine3', 'red'), bty = 'n', lwd=c(0,0,0,0,1.5), pt.cex=c(2,2,2,2,1))</div><div>dev.off()</div><div><br></div><div><span style="font-family:Helvetica">----------------------------------------------------------------</span><br style="font-family:Helvetica"><div style="font-family:Helvetica"><div>Daniel Tiezzi, MD, PhD</div><div>Oncologia / Mastologia<br>Professor Associado - Livre Docente<br>Departamento de Ginecologia e Obstetrícia<br>Setor de Mastologia e Oncologia Ginecológica<br>Faculdade de Medicina de Ribeirão Preto - USP<br>Tel.: 16 3602-2488</div><div><div style="font-family:Menlo-Regular"><font face="Helvetica"><a href="https://github.com/dtiezzi" target="_blank">https://github.com/dtiezzi</a></font></div><div style="font-family:Menlo-Regular"><font face="Helvetica"><a href="http://danieltiezzi.pro.br/" target="_blank">http://danieltiezzi.pro.br</a></font></div><a href="mailto:dtiezzi@usp.br" target="_blank">e-mail: dtiezzi@usp.br</a></div></div></div><div><br><blockquote type="cite"><div>On 2 Feb 2021, at 12:55, Olympio Neto por (R-br) <<a href="mailto:r-br@listas.c3sl.ufpr.br" target="_blank">r-br@listas.c3sl.ufpr.br</a>> wrote:</div><br><div><div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif"><span id="gmail-m_-2807509265470781808cid:ii_kko6ocgw0"><image.png></span><br></div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif"><div class="gmail_default">Mas no fim, estou achando muito confuso. Talvez separados representem melhor o objetivo.</div><div class="gmail_default"><br></div><div class="gmail_default">De qualquer forma, obrigado!</div><font color="#888888" style="font-family:Arial,Helvetica,sans-serif"><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">Olympio</div></font></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em ter., 2 de fev. de 2021 às 11:59, Daniel Guimarães Tiezzi <<a href="mailto:dtiezzi@usp.br" target="_blank">dtiezzi@usp.br</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Bom dia<div><br></div><div>Seria algo assim?</div><div><br></div><div><div>df <- structure(list(Mês = c("Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez", "Total"), `2016` = c(209L, 3959L, 8668L, 5448L, 4198L, 4042L, 4602L, 6969L, 3336L, 8580L, 6036L, 352L, 56399L), `2017` = c(314L, 2740L, 2758L, 2424L, 4138L, 2030L, 280L, 4552L, 2509L, 2847L, 6322L, 179L, 31093L), `2018` = c(778L, 3968L, 3092L, 2357L, 1333L, 895L, 5489L, 3598L, 4072L, 5562L, 6218L, 115L, 37477L), `2019` = c(246L, 2353L, 2905L, 4563L, 2791L, 493L, 3197L, 6463L, 1375L, 5626L, 10443L, 138L, 40593L), `2020` = c(76L, 2685L, 2062L, 0L, 0L, 0L, 0L, 1408L, 1554L, 3831L, 4573L, 1104L, 17293L)), class = "data.frame", row.names = c(NA, -13L)) </div><div>df</div><div><br></div><div>df_s <- as.data.frame(t(df[nrow(df),-1]))</div><div>colnames(df_s) <- 'total'</div><div>df_s$ano <- seq(2016, 2020)</div><div>df_s</div><div>library(ggplot2)</div><div>p0 <- ggplot(data = df_s, aes(y=stat(total), x = ano)) + geom_bar() + theme_minimal()</div><div>p0</div><div><br></div><div>df_l <- df[-nrow(df), c(1,6)]</div><div>colnames(df_l) <- c('m', 'val')</div><div>df_l</div><div>p1 <- ggplot(data = df_l, aes(x = m, y = val, group = 1)) + geom_line() + theme_minimal()</div><div>p1</div><div><br></div><div><div style="font-family:Helvetica">----------------------------------------------------------------<br><div><div>Daniel Tiezzi, MD, PhD</div><div>Oncologia / Mastologia<br>Professor Associado - Livre Docente<br>Departamento de Ginecologia e Obstetrícia<br>Setor de Mastologia e Oncologia Ginecológica<br>Faculdade de Medicina de Ribeirão Preto - USP<br>Tel.: 16 3602-2488</div><div><div style="font-family:Menlo-Regular"><font face="Helvetica"><a href="https://github.com/dtiezzi" target="_blank">https://github.com/dtiezzi</a></font></div><div style="font-family:Menlo-Regular"><font face="Helvetica"><a href="http://danieltiezzi.pro.br/" target="_blank">http://danieltiezzi.pro.br</a></font></div><a href="mailto:dtiezzi@usp.br" target="_blank">e-mail: dtiezzi@usp.br</a></div></div><div><br></div></div></div><div><br><blockquote type="cite"><div>On 2 Feb 2021, at 11:07, Olympio Neto por (R-br) <<a href="mailto:r-br@listas.c3sl.ufpr.br" target="_blank">r-br@listas.c3sl.ufpr.br</a>> wrote:</div><br><div><span style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">structure(list(Mês = c("Jan", "Fev", "Mar", "Abr", "Mai", "Jun",<span> </span></span><br style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">"Jul", "Ago", "Set", "Out", "Nov", "Dez", "Total"), `2016` = c(209L,<span> </span></span><br style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">3959L, 8668L, 5448L, 4198L, 4042L, 4602L, 6969L, 3336L, 8580L,<span> </span></span><br style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">6036L, 352L, 56399L), `2017` = c(314L, 2740L, 2758L, 2424L, 4138L,<span> </span></span><br style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">2030L, 280L, 4552L, 2509L, 2847L, 6322L, 179L, 31093L), `2018` = c(778L,<span> </span></span><br style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">3968L, 3092L, 2357L, 1333L, 895L, 5489L, 3598L, 4072L, 5562L,<span> </span></span><br style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">6218L, 115L, 37477L), `2019` = c(246L, 2353L, 2905L, 4563L, 2791L,<span> </span></span><br style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">493L, 3197L, 6463L, 1375L, 5626L, 10443L, 138L, 40593L), `2020` = c(76L,<span> </span></span><br style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">2685L, 2062L, 0L, 0L, 0L, 0L, 1408L, 1554L, 3831L, 4573L, 1104L,<span> </span></span><br style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div class="gmail_default" style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-family:georgia,serif"><span style="font-family:Arial,Helvetica,sans-serif">17293L)), class = "data.frame", row.names = c(NA, -13L))</span> </div></div></blockquote></div><br></div></div></blockquote></div>
_______________________________________________<br>R-br mailing list<br><a href="mailto:R-br@listas.c3sl.ufpr.br" target="_blank">R-br@listas.c3sl.ufpr.br</a><br><a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br>Leia o guia de postagem (<a href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br></div></blockquote></div><br></div></div></blockquote></div>