<div dir="ltr">cumsum(c(1,34:2)) e cumsum(c(34,33:1))<br><div><br></div><div style>Basicamente é: cumsum(c(Primeiro Termo, Primeira Razao:Ultima Razao))</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/4/28  <span dir="ltr"><<a href="mailto:andrebvs@bol.com.br" target="_blank">andrebvs@bol.com.br</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Olá colegas,</div>
<div> </div>
<div>Como posso criar de forma simples no R, as sequências 1 e 2 abaixo? considerando as respectivas razões em cada sequência. <br><br>desde já agradeço!<br><br><em>Att.</em><br><em>André</em></div>
<div> </div>
<div> </div>
<div>
<table width="995" border="0" cellspacing="0" cellpadding="0"><colgroup><col style="width:64pt" width="85"> <col style="width:20pt" span="35" width="26"> </colgroup>
<tbody>
<tr style="min-height:15.0pt">
<td style="min-height:15.0pt;width:64pt" width="85" height="20">seq 1</td>
<td style="width:20pt" width="26"> </td>
<td style="width:20pt" width="26">1</td>
<td style="width:20pt" width="26">35</td>
<td style="width:20pt" width="26">68</td>
<td style="width:20pt" width="26">100</td>
<td style="width:20pt" width="26">131</td>
<td style="width:20pt" width="26">161</td>
<td style="width:20pt" width="26">190</td>
<td style="width:20pt" width="26">218</td>
<td style="width:20pt" width="26">245</td>
<td style="width:20pt" width="26">271</td>
<td style="width:20pt" width="26">296</td>
<td style="width:20pt" width="26">320</td>
<td style="width:20pt" width="26">343</td>
<td style="width:20pt" width="26">365</td>
<td style="width:20pt" width="26">386</td>
<td style="width:20pt" width="26">406</td>
<td style="width:20pt" width="26">425</td>
<td style="width:20pt" width="26">443</td>
<td style="width:20pt" width="26">460</td>
<td style="width:20pt" width="26">476</td>
<td style="width:20pt" width="26">491</td>
<td style="width:20pt" width="26">505</td>
<td style="width:20pt" width="26">518</td>
<td style="width:20pt" width="26">530</td>
<td style="width:20pt" width="26">541</td>
<td style="width:20pt" width="26">551</td>
<td style="width:20pt" width="26">560</td>
<td style="width:20pt" width="26">568</td>
<td style="width:20pt" width="26">575</td>
<td style="width:20pt" width="26">581</td>
<td style="width:20pt" width="26">586</td>
<td style="width:20pt" width="26">590</td>
<td style="width:20pt" width="26">593</td>
<td style="width:20pt" width="26">595</td>
</tr>
<tr style="min-height:15.0pt">
<td style="min-height:15.0pt" height="20">razão 1</td>
<td> </td>
<td> </td>
<td>34</td>
<td>33</td>
<td>32</td>
<td>31</td>
<td>30</td>
<td>29</td>
<td>28</td>
<td>27</td>
<td>26</td>
<td>25</td>
<td>24</td>
<td>23</td>
<td>22</td>
<td>21</td>
<td>20</td>
<td>19</td>
<td>18</td>
<td>17</td>
<td>16</td>
<td>15</td>
<td>14</td>
<td>13</td>
<td>12</td>
<td>11</td>
<td>10</td>
<td>9</td>
<td>8</td>
<td>7</td>
<td>6</td>
<td>5</td>
<td>4</td>
<td>3</td>
<td>2</td>
</tr>
<tr style="min-height:15.0pt">
<td style="min-height:15.0pt" height="20"> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr style="min-height:15.0pt">
<td style="min-height:15.0pt" height="20">seq 2</td>
<td> </td>
<td>34</td>
<td>67</td>
<td>99</td>
<td>130</td>
<td>160</td>
<td>189</td>
<td>217</td>
<td>244</td>
<td>270</td>
<td>295</td>
<td>319</td>
<td>342</td>
<td>364</td>
<td>385</td>
<td>405</td>
<td>424</td>
<td>442</td>
<td>459</td>
<td>475</td>
<td>490</td>
<td>504</td>
<td>517</td>
<td>529</td>
<td>540</td>
<td>550</td>
<td>559</td>
<td>567</td>
<td>574</td>
<td>580</td>
<td>585</td>
<td>589</td>
<td>592</td>
<td>594</td>
<td>595</td>
</tr>
<tr style="min-height:15.0pt">
<td style="min-height:15.0pt" height="20">razão 2</td>
<td> </td>
<td> </td>
<td>33</td>
<td>32</td>
<td>31</td>
<td>30</td>
<td>29</td>
<td>28</td>
<td>27</td>
<td>26</td>
<td>25</td>
<td>24</td>
<td>23</td>
<td>22</td>
<td>21</td>
<td>20</td>
<td>19</td>
<td>18</td>
<td>17</td>
<td>16</td>
<td>15</td>
<td>14</td>
<td>13</td>
<td>12</td>
<td>11</td>
<td>10</td>
<td>9</td>
<td>8</td>
<td>7</td>
<td>6</td>
<td>5</td>
<td>4</td>
<td>3</td>
<td>2</td>
<td>1</td>
</tr>
</tbody>
</table>
</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></div>