<HTML><HEAD>
<META content="text/html; charset=ISO-8859-1" http-equiv=Content-Type></HEAD>
<BODY dir=ltr bgColor=#ffffff text=#000000>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial'; COLOR: #000000">
<DIV>Alexandre,</DIV>
<DIV> </DIV>
<DIV>O objeto que enviou não parece ter a estrutura que vc falou.</DIV>
<DIV>Mas se seus dados estiverem ordenados por meses, </DIV>
<DIV> </DIV><SPAN class=Apple-style-span
style="FONT-FAMILY: ; WHITE-SPACE: pre-wrap; WORD-SPACING: 0px; BORDER-COLLAPSE: separate; TEXT-TRANSFORM: none; COLOR: ; ORPHANS: 2; WIDOWS: 2; LETTER-SPACING: normal; LINE-HEIGHT: 17px; TEXT-INDENT: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px"><PRE tabIndex=0 class=GCG2UJHDNAB style="BORDER-TOP-STYLE: none; FONT-FAMILY: ; WHITE-SPACE: pre-wrap !important; BORDER-BOTTOM-STYLE: none; WORD-BREAK: break-all; BORDER-RIGHT-STYLE: none; OUTLINE-STYLE: none; MARGIN: 0px; BORDER-LEFT-STYLE: none; OUTLINE-COLOR: ; LINE-HEIGHT: 1.2; -webkit-user-select: text"><SPAN class="GCG2UJHDABB ace_keyword" style="WHITE-SPACE: pre; COLOR: ; -webkit-user-select: text"><FONT color=#0000ff face="Lucida Console"><FONT style="FONT-SIZE: 11pt; BACKGROUND-COLOR: #e1e2e5">> </FONT></FONT></SPAN><FONT style="FONT-SIZE: 11pt"><FONT face="Lucida Console"><FONT style="BACKGROUND-COLOR: #e1e2e5"><SPAN class="GCG2UJHDEAB ace_keyword" style="COLOR: "><FONT color=#0000ff>sp[c(1,5,89,200,216),]
</FONT></SPAN> Sp1 Sp2 Sp3 Sp4
1 101.20315 96.83025 95.74570 104.38100
5 99.13003 98.05711 98.44344 97.72637
89 98.88583 101.97051 99.31058 102.20602
200 95.72225 100.38504 101.06742 102.75147
216 100.06324 100.50797 100.69345 101.10212
<SPAN class="GCG2UJHDABB ace_keyword" style="WHITE-SPACE: pre; COLOR: ; -webkit-user-select: text"><FONT color=#0000ff></FONT></SPAN></FONT></FONT></FONT></PRE><PRE tabIndex=0 class=GCG2UJHDNAB style="BORDER-TOP-STYLE: none; FONT-FAMILY: ; WHITE-SPACE: pre-wrap !important; BORDER-BOTTOM-STYLE: none; WORD-BREAK: break-all; BORDER-RIGHT-STYLE: none; OUTLINE-STYLE: none; MARGIN: 0px; BORDER-LEFT-STYLE: none; OUTLINE-COLOR: ; LINE-HEIGHT: 1.2; -webkit-user-select: text"><FONT face=Arial>O código a seguir pode funcionar</FONT></PRE><PRE tabIndex=0 class=GCG2UJHDNAB style="BORDER-TOP-STYLE: none; FONT-FAMILY: ; WHITE-SPACE: pre-wrap !important; BORDER-BOTTOM-STYLE: none; WORD-BREAK: break-all; BORDER-RIGHT-STYLE: none; OUTLINE-STYLE: none; MARGIN: 0px; BORDER-LEFT-STYLE: none; OUTLINE-COLOR: ; LINE-HEIGHT: 1.2; -webkit-user-select: text"><FONT style="FONT-SIZE: 11pt"><FONT face="Lucida Console"><FONT style="BACKGROUND-COLOR: #e1e2e5"><SPAN class="GCG2UJHDABB ace_keyword" style="WHITE-SPACE: pre; COLOR: ; -webkit-user-select: text"><FONT color=#0000ff>> </FONT></SPAN></FONT></FONT><FONT color=#0000ff><FONT face="Lucida Console"><FONT style="BACKGROUND-COLOR: #e1e2e5"><SPAN class="GCG2UJHDEAB ace_keyword" style="COLOR: ">mes=rep(1:12,(2014-1996))
</SPAN><SPAN class="GCG2UJHDABB ace_keyword" style="WHITE-SPACE: pre; COLOR: ; -webkit-user-select: text">> </SPAN></FONT></FONT></FONT><FONT color=#0000ff><FONT face="Lucida Console"><FONT style="BACKGROUND-COLOR: #e1e2e5"><SPAN class="GCG2UJHDEAB ace_keyword" style="COLOR: ">ano=rep(1997:2014,each = 12)
</SPAN><SPAN class="GCG2UJHDABB ace_keyword" style="WHITE-SPACE: pre; COLOR: ; -webkit-user-select: text">> </SPAN></FONT></FONT></FONT></FONT><FONT face="Lucida Console"><FONT style="FONT-SIZE: 11pt"><FONT style="BACKGROUND-COLOR: #e1e2e5"><SPAN class="GCG2UJHDEAB ace_keyword" style="COLOR: "><FONT color=#0000ff>(Tot <-aggregate(sp, by=list(ano), FUN=sum, na.rm=TRUE))
</FONT></SPAN> Group.1 Sp1 Sp2 Sp3 Sp4
1 1997 1203.948 1197.491 1203.537 1207.432
2 1998 1201.671 1225.573 1191.417 1192.366
3 1999 1206.173 1206.108 1191.918 1218.957
4 2000 1199.445 1214.414 1197.911 1190.456</FONT></FONT></FONT></PRE></SPAN>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV style="FONT: 10pt tahoma">
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Att</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=alexandre.loures@ymail.com
href="mailto:alexandre.loures@ymail.com">Alexandre Loures</A> </DIV>
<DIV><B>Sent:</B> Tuesday, April 08, 2014 8:37 PM</DIV>
<DIV><B>To:</B> <A title=r-br@listas.c3sl.ufpr.br
href="mailto:r-br@listas.c3sl.ufpr.br">r-br@listas.c3sl.ufpr.br</A> </DIV>
<DIV><B>Subject:</B> Re: [R-br] Somar intervalo de valores nas
colunas</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>Olá
Rodrigo Coster!<BR><BR><BR>É isto mesmo que você solicitou?<BR><BR><BR><BR>>
dput(head(sp))<BR>structure(c(38795229L, 63924605L, 0L, 0L, 0L, 0L, 33680798L,
<BR>51477786L, 0L, 0L, 0L, 0L, 32400472L, 39645654L, 0L, 0L, 0L, <BR>0L,
68022854L, 56066200L, 0L, 0L, 0L, 0L, 31881633L, 67045744L, <BR>0L, 0L, 0L, 0L,
452118806L, 500158705L, 0L, 0L, 0L, 0L, 21795038L, <BR>13562364L, 0L, 0L, 0L,
0L, 2730838L, 4259594L, 0L, 0L, 0L, 0L, <BR>103132447L, 85622631L, 0L, 0L, 0L,
0L, 60353896L, 61121454L, <BR>0L, 0L, 0L, 0L, 32403301L, 40519152L, 0L, 0L, 0L,
0L, 116570336L, <BR>110079499L, 0L, 0L, 0L, 0L, 166832925L, 149309546L, 0L, 0L,
0L, <BR>0L, 78060254L, 101650482L, 0L, 0L, 0L, 0L, 25985390L, 36699369L, <BR>0L,
0L, 0L, 0L, 69222831L, 80306324L, 0L, 0L, 0L, 0L, 4392027L, <BR>4567085L, 0L,
0L, 0L, 0L, 33752865L, 41537988L, 0L, 0L, 0L, 0L, <BR>80216802L, 88982746L, 0L,
0L, 0L, 0L, 1489612L, 1465175L, 0L, <BR>0L, 0L, 0L, 60973115L, 54078115L, 0L,
0L, 0L, 0L, 28441802L, <BR>50033001L, 0L, 0L, 0L, 0L, 60420736L, 17987780L, 0L,
0L, 0L, <BR>0L, 28824716L, 48507914L, 0L, 0L, 0L, 0L, 444712L, 328451L, 0L,
<BR>0L, 0L, 0L, 786654L, 838397L, 0L, 0L, 0L, 0L, 12933000L, 10051098L, <BR>0L,
0L, 0L, 0L, 39827569L, 45256447L, 0L, 0L, 0L, 0L, 58803226L, <BR>76290276L, 0L,
0L, 0L, 0L, 46468076L, 38537192L, 0L, 0L, 0L, <BR>0L, 53314093L, 33200142L, 0L,
0L, 0L, 0L, 34642085L, 23556561L, <BR>0L, 0L, 0L, 0L, 119213241L, 121005345L,
0L, 0L, 0L, 0L, 274982262L, <BR>244713051L, 0L, 0L, 0L, 0L, 74376824L,
35888744L, 0L, 0L, 0L, <BR>0L, 2144991L, 2440378L, 0L, 0L, 0L, 0L, 114384520L,
74615518L, <BR>0L, 0L, 0L, 0L, 54130383L, 62022477L, 0L, 0L, 0L, 0L, 3340357L,
<BR>4785296L, 0L, 0L, 0L, 0L, 3396350L, 3538952L, 0L, 0L, 0L, 0L, <BR>7356480L,
6493192L, 0L, 0L, 0L, 0L, 30067652L, 34811828L, 0L, <BR>0L, 0L, 0L, 10236714L,
14744233L, 0L, 0L, 0L, 0L, 21064904L, <BR>28239710L, 0L, 0L, 0L, 0L, 5987416L,
9771117L, 0L, 0L, 0L, 0L, <BR>16779486L, 11925052L, 0L, 0L, 0L, 0L, 9060866L,
13985017L, 0L, <BR>0L, 0L, 0L, 15448503L, 24449350L, 0L, 0L, 0L, 0L, 8407209L,
20023742L, <BR>0L, 0L, 0L, 0L, 38288341L, 43777071L, 0L, 0L, 0L, 0L, 610282312L,
<BR>508090709L, 0L, 0L, 0L, 0L), .Dim = c(6L, 51L), .Dimnames =
list(<BR> NULL, c("sp1", "sp2", "sp3", "sp4", "sp5", "sp6",
"sp7", <BR> "sp8", "sp9", "sp10", "sp11", "sp12", "sp13",
"sp14", "sp15", <BR> "sp16", "sp17", "sp18", "sp19", "sp20",
"sp21", "sp22", "sp23", <BR> "sp24", "sp25", "sp26", "sp27",
"sp28", "sp29", "sp30", "sp31", <BR> "sp32", "sp33", "sp34",
"sp35", "sp36", "sp37", "sp38", "sp39", <BR> "sp40", "sp41",
"sp42", "sp43", "sp44", "sp45", "sp46", "sp47", <BR> "sp48",
"sp49", "sp50", "sp51")))<BR><BR><BR><BR><BR><BR>
<DIV class=moz-cite-prefix>Em 08-04-2014 18:37, Rodrigo Coster
escreveu:<BR></DIV>
<BLOCKQUOTE
cite=mid:CAKU4wovPiJ2dNq906_hZzDub2DNwHZioLwZ0rPvkLYY=8PS-Yg@mail.gmail.com
type="cite">
<DIV dir=ltr>Sem saber como são os teus dados fica complicado a gente de dar
um comando que certamente funcionará... da um dput(head(dados)) e nos envia o
que aparecer na tela</DIV>
<DIV class=gmail_extra><BR><BR>
<DIV class=gmail_quote>2014-04-08 18:34 GMT-03:00 Daniel C Bezerra <SPAN
dir=ltr><<A href="mailto:danielcbezerra@gmail.com" target=_blank
moz-do-not-send="true">danielcbezerra@gmail.com</A>></SPAN>:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV dir=ltr>apply(nomedobanco,2,sum)<BR></DIV>
<DIV class=gmail_extra><BR><BR>
<DIV class=gmail_quote>2014-04-08 18:07 GMT-03:00 Alexandre Loures <SPAN
dir=ltr><<A href="mailto:alexandre.loures@ymail.com" target=_blank
moz-do-not-send="true">alexandre.loures@ymail.com</A>></SPAN>:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV>
<DIV class=h5>
<DIV text="#000000" bgcolor="#FFFFFF">Olá pessoal!<BR><BR>Tenho uma base
de dados com 216 observações de 10 variáveis. Sendo que essas observações
são mensais, mas tenho que trabalhar com o total anual.<BR><BR>Ou seja, eu
tenho dados para os meses de 1997, 1998, 1999, 2000, ..., 2014. Mas quero
os totais desses anos em cada coluna.<BR><BR>Alguém saberia como fazer
isso?<BR><BR><BR><BR>Desde já muito obrigado!<SPAN><FONT
color=#888888><BR><BR><BR><BR>
<DIV>-- <BR><FONT size=1><B>Alexandre Rodrigues
Loures</B><BR></FONT></DIV></FONT></SPAN></DIV>
<DIV> </DIV></DIV></DIV>_______________________________________________<BR>R-br
mailing list<BR><A href="mailto:R-br@listas.c3sl.ufpr.br" target=_blank
moz-do-not-send="true">R-br@listas.c3sl.ufpr.br</A><BR><A
href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br"
target=_blank
moz-do-not-send="true">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 moz-do-not-send="true">http://www.leg.ufpr.br/r-br-guia</A>)
e forneça código mínimo reproduzível.<BR></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV><BR>_______________________________________________<BR>R-br
mailing list<BR><A href="mailto:R-br@listas.c3sl.ufpr.br"
moz-do-not-send="true">R-br@listas.c3sl.ufpr.br</A><BR><A
href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br"
target=_blank
moz-do-not-send="true">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
moz-do-not-send="true">http://www.leg.ufpr.br/r-br-guia</A>) e forneça
código mínimo reproduzível.<BR></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV><BR>
<FIELDSET class=mimeAttachmentHeader></FIELDSET> <BR><PRE wrap="">_______________________________________________
R-br mailing list
<A class=moz-txt-link-abbreviated href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</A>
<A class=moz-txt-link-freetext href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</A>
Leia o guia de postagem (<A class=moz-txt-link-freetext href="http://www.leg.ufpr.br/r-br-guia">http://www.leg.ufpr.br/r-br-guia</A>) e forneça código mínimo reproduzível.</PRE></BLOCKQUOTE><BR>
<DIV class=moz-signature>-- <BR><FONT size=1><B>Alexandre Rodrigues
Loures</B><BR></FONT></DIV>
<P>
<HR>
_______________________________________________<BR>R-br mailing
list<BR>R-br@listas.c3sl.ufpr.br<BR>https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br<BR>Leia
o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código mínimo
reproduzível.</DIV></DIV></DIV></BODY></HTML>