cumsum()<br><br><div class="gmail_quote">2011/12/19 Luiz André Zardo <span dir="ltr"><<a href="mailto:luiz.zardo@gmail.com">luiz.zardo@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p>Prezados colegas,</p>
<div>Como faço para criar uma variável em um dataframe que seja soma acumulada de outra variável?</div>
<div> </div>
<div>
<table style="WIDTH:160pt;BORDER-COLLAPSE:collapse" border="0" cellpadding="0" cellspacing="0" width="212">
<colgroup>
<col style="WIDTH:48pt" width="64">
<col style="WIDTH:56pt" span="2" width="74">
</colgroup><tbody>
<tr style="min-height:12.75pt" height="17">
<td style="BORDER-BOTTOM:#ece9d8;BORDER-LEFT:#ece9d8;BACKGROUND-COLOR:transparent;WIDTH:48pt;min-height:12.75pt;BORDER-TOP:#ece9d8;BORDER-RIGHT:#ece9d8" height="17" width="64"><font face="MS Sans Serif">i</font></td>

<td style="BORDER-BOTTOM:#ece9d8;BORDER-LEFT:#ece9d8;BACKGROUND-COLOR:transparent;WIDTH:56pt;BORDER-TOP:#ece9d8;BORDER-RIGHT:#ece9d8" width="74"><font face="MS Sans Serif">Xi</font></td>
<td style="BORDER-BOTTOM:#ece9d8;BORDER-LEFT:#ece9d8;BACKGROUND-COLOR:transparent;WIDTH:56pt;BORDER-TOP:#ece9d8;BORDER-RIGHT:#ece9d8" width="74"><font face="MS Sans Serif">Yi</font></td></tr>
<tr style="min-height:12.75pt" height="17">
<td style="BORDER-BOTTOM:#ece9d8;BORDER-LEFT:#ece9d8;BACKGROUND-COLOR:transparent;min-height:12.75pt;BORDER-TOP:#ece9d8;BORDER-RIGHT:#ece9d8" height="17"><font face="MS Sans Serif">1</font></td>
<td style="BORDER-BOTTOM:#ece9d8;BORDER-LEFT:#ece9d8;BACKGROUND-COLOR:transparent;BORDER-TOP:#ece9d8;BORDER-RIGHT:#ece9d8"><font face="MS Sans Serif">a</font></td>
<td style="BORDER-BOTTOM:#ece9d8;BORDER-LEFT:#ece9d8;BACKGROUND-COLOR:transparent;BORDER-TOP:#ece9d8;BORDER-RIGHT:#ece9d8"><font face="MS Sans Serif">a</font></td></tr>
<tr style="min-height:12.75pt" height="17">
<td style="BORDER-BOTTOM:#ece9d8;BORDER-LEFT:#ece9d8;BACKGROUND-COLOR:transparent;min-height:12.75pt;BORDER-TOP:#ece9d8;BORDER-RIGHT:#ece9d8" height="17"><font face="MS Sans Serif">2</font></td>
<td style="BORDER-BOTTOM:#ece9d8;BORDER-LEFT:#ece9d8;BACKGROUND-COLOR:transparent;BORDER-TOP:#ece9d8;BORDER-RIGHT:#ece9d8"><font face="MS Sans Serif">b</font></td>
<td style="BORDER-BOTTOM:#ece9d8;BORDER-LEFT:#ece9d8;BACKGROUND-COLOR:transparent;BORDER-TOP:#ece9d8;BORDER-RIGHT:#ece9d8"><font face="MS Sans Serif">a+b</font></td></tr>
<tr style="min-height:12.75pt" height="17">
<td style="BORDER-BOTTOM:#ece9d8;BORDER-LEFT:#ece9d8;BACKGROUND-COLOR:transparent;min-height:12.75pt;BORDER-TOP:#ece9d8;BORDER-RIGHT:#ece9d8" height="17"><font face="MS Sans Serif">3</font></td>
<td style="BORDER-BOTTOM:#ece9d8;BORDER-LEFT:#ece9d8;BACKGROUND-COLOR:transparent;BORDER-TOP:#ece9d8;BORDER-RIGHT:#ece9d8"><font face="MS Sans Serif">c</font></td>
<td style="BORDER-BOTTOM:#ece9d8;BORDER-LEFT:#ece9d8;BACKGROUND-COLOR:transparent;BORDER-TOP:#ece9d8;BORDER-RIGHT:#ece9d8"><font face="MS Sans Serif">a+b+c</font></td></tr></tbody></table></div>
<div> </div>
<div>Obrigado.</div>
<br>_______________________________________________<br>
R-br mailing list<br>
<a href="mailto:R-br@listas.c3sl.ufpr.br">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></blockquote></div><br>