<div>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;">Caros colegas, como posso <span style="color: #061a99">alocar (</span>colocar<span style="color: #061a99">) </span>os<span style="color: #061a99"> </span>valores da coluna<font color="#061a99"> </font>X2 (dada abaixo<span style="color: #061a99">) </span>de<span style="color: #061a99"> </span>acordo com os valores da<span style="color: #061a99"> </span>coluna X1<span style="color: #061a99">, </span>em que os valores</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;">da coluna X1 são referentes ao índice da lista li. <br />
<br />
Exemplo:</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; min-height: 15px;"> </p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153);"><span style="color: #000000">li</span> <- as.list(rep(<span style="color: #c38809">NA</span>,<span style="color: #045218">10</span>))</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153);"><span style="color: #000000">dt </span><- data.frame(matrix(c(<span style="color: #045218">2</span>,<span style="color: #045218">5</span>,<span style="color: #045218">6</span>,<span style="color: #045218">6</span>,<span style="color: #045218">7</span>,<span style="color: #045218">9</span>,<span style="color: #045218">9</span>,<span style="color: #045218">9</span>,<span style="color: #045218">49</span>,<span style="color: #045218">76</span>,<span style="color: #045218">95</span>,<span style="color: #045218">33</span>,<span style="color: #045218">19</span>,<span style="color: #045218">51</span>,<span style="color: #045218">15</span>,<span style="color: #045218">22</span>),,<span style="color: #045218">2</span>))<br />
<br />
X1 X2<br />
1 2 49<br />
2 5 76<br />
3 6 95<br />
4 6 33<br />
5 7 19<br />
6 9 51<br />
7 9 15<br />
8 9 22</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(176, 22, 0); min-height: 15px;"> </p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;">Saída desejada<span style="color: #061a99">:</span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153); min-height: 15px;"> </p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153);">[[<span style="color: #045218">1</span>]]</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(195, 136, 9);"> NA</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153); min-height: 15px;"> </p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153);">[[<span style="color: #045218">2</span>]]</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(4, 82, 24);"><span style="color: #c38809"> </span>49</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153); min-height: 15px;"> </p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153);">[[<span style="color: #045218">3</span>]]</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(195, 136, 9);"> NA</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153); min-height: 15px;"> </p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153);">[[<span style="color: #045218">4</span>]]</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(195, 136, 9);"> NA</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153); min-height: 15px;"> </p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153);">[[<span style="color: #045218">5</span>]]</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(4, 82, 24);"><span style="color: #c38809"> </span>76</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153); min-height: 15px;"> </p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153);">[[<span style="color: #045218">6</span>]]</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(4, 82, 24);"><span style="color: #c38809"> </span>95 33</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153); min-height: 15px;"> </p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153);">[[<span style="color: #045218">7</span>]]</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(4, 82, 24);"><span style="color: #c38809"> </span>19</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153); min-height: 15px;"> </p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153);">[[<span style="color: #045218">8</span>]]</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(195, 136, 9);"> NA</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153); min-height: 15px;"> </p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153);">[[<span style="color: #045218">9</span>]]</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(4, 82, 24);"><span style="color: #c38809"> </span>51 15 22</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153); min-height: 15px;"> </p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(6, 26, 153);">[[<span style="color: #045218">10</span>]]</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(195, 136, 9);"> NA</p>
<br />
desde já agradecido.<br />
<br />
<em>Att.<br />
André</em></div>