<p dir="ltr">Seu exemplo não é reproduzivel</p>
<div class="gmail_quote">Em 26/11/2014 16:23, "Simone D. Sartorio" <<a href="mailto:sisartorio@yahoo.com.br">sisartorio@yahoo.com.br</a>> escreveu:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="color:#000;background-color:#fff;font-family:Courier New,courier,monaco,monospace,sans-serif;font-size:12px"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12px"><div dir="ltr">Pessoal, boa noite!</div><div dir="ltr"><br></div><div dir="ltr">Gostaria de uma ajuda, talvez seja bem fácil para aqueles que programam...</div><div dir="ltr"><br></div><div dir="ltr">1) Tenho um banco de dados ("dados_prod") grande (110mil linhas) e preciso arrumar uma variavel que irei utilizar...a variavel é "dia_ciclo". O problema é que preciso q esta variavel (dia_ciclo), dentro de cada "n_injeção" esteja entre 1 a 14 (Ou seja, da injeção de n. 0 a 17, cada injeção tem 14 dias). O problema seria fácil se todas as minhas 240 vacas tivessem o mesmo número de tempos observados no inicio do experimento...mas não temos...alguma sugestão para resolver isso?</div><div dir="ltr"><br></div><div dir="ltr">2) Deste mesmo banco de dados, um outro problema, seria retirar todas as injeções "n_injecao= -1".</div><div dir="ltr"><br></div><div dir="ltr">Estive pensando aqui, resolvendo o problema 2) primeiro o 1) fica bem facil...</div><div dir="ltr"><br></div><div dir="ltr">Alguém pode me ajudar nisso?</div><div dir="ltr">Desde já, muito obrigada</div><div dir="ltr">Simone</div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">Exemplo: Dados de 1 vaca!</div><div><font face="Courier New, courier, monaco, monospace, sans-serif">> (vaca1731<- subset(dados_prod, dados_prod$n_vaca==1731)); dim(vaca1731)</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif"> n_vaca n_lactacao trat pri_multiparas n_injecao dia_CICLO dia_exp producao saude</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">1 1731 3 1 2 -1 -7 -21 46.0 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">2 1731 3 1 2 -1 -6 -20 49.7 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">3 1731 3 1 2 -1 -5 -19 50.2 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">4 1731 3 1 2 -1 -4 -18 54.3 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">5 1731 3 1 2 -1 -3 -17 47.4 heat</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">6 1731 3 1 2 -1 -2 -16 49.3 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">7 1731 3 1 2 -1 -1 -15 46.7 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">8 1731 3 1 2 -1 0 -14 45.1 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">9 1731 3 1 2 0 -13 -13 47.8 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">10 1731 3 1 2 0 -12 -12 45.5 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">11 1731 3 1 2 0 -11 -11 45.2 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">12 1731 3 1 2 0 -10 -10 47.4 enrollment</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">13 1731 3 1 2 0 -9 -9 48.3 enrollment</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">14 1731 3 1 2 0 -8 -8 46.4 enrollment</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">15 1731 3 1 2 0 -7 -7 47.9 enrollment</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">16 1731 3 1 2 0 -6 -6 50.3 enrollment</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">17 1731 3 1 2 0 -5 -5 50.8 enrollment</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">18 1731 3 1 2 0 -4 -4 47.9 enrollment</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">19 1731 3 1 2 0 -3 -3 46.2 heat</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">20 1731 3 1 2 0 -2 -2 50.8 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">21 1731 3 1 2 0 -1 -1 45.8 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">22 1731 3 1 2 0 0 0 50.5 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">23 1731 3 1 2 1 1 1 49.0 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">24 1731 3 1 2 1 2 2 48.8 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">25 1731 3 1 2 1 3 3 53.9 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">26 1731 3 1 2 1 4 4 45.4 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">27 1731 3 1 2 1 5 5 38.6 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">28 1731 3 1 2 1 6 6 41.3 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">29 1731 3 1 2 1 7 7 50.2 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">30 1731 3 1 2 1 8 8 50.2 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">31 1731 3 1 2 1 9 9 50.4 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">32 1731 3 1 2 1 10 10 49.9 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">33 1731 3 1 2 1 11 11 50.1 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">34 1731 3 1 2 1 12 12 52.0 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">35 1731 3 1 2 1 13 13 47.8 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">36 1731 3 1 2 1 0 14 50.0 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">37 1731 3 1 2 2 1 15 49.7 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">38 1731 3 1 2 2 2 16 50.4 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">39 1731 3 1 2 2 3 17 48.9 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">40 1731 3 1 2 2 4 18 49.5 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">41 1731 3 1 2 2 5 19 48.8 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">42 1731 3 1 2 2 6 20 56.3 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">43 1731 3 1 2 2 7 21 52.1 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">44 1731 3 1 2 2 8 22 51.6 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">45 1731 3 1 2 2 9 23 50.5 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">46 1731 3 1 2 2 10 24 46.0 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">47 1731 3 1 2 2 11 25 53.7 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">48 1731 3 1 2 2 12 26 51.7 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">49 1731 3 1 2 2 13 27 49.1 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">50 1731 3 1 2 2 0 28 51.9 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">51 1731 3 1 2 3 1 29 51.4 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">52 1731 3 1 2 3 2 30 43.6 healthy</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">...</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">259 1731 3 1 2 17 13 237 19.9 lameness</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">260 1731 3 1 2 17 0 238 18.8 lameness</font></div><div></div><div><font face="Courier New, courier, monaco, monospace, sans-serif">[1] 259 9</font></div><div><span><br></span></div><div><span><br></span></div><div></div><div> </div><div><div><i><b><font size="3" face="times new roman, new york, times, serif">***---***---***---***---***---***---***---***---***---***---***---***---***</font></b></i></div><div style="background-color:transparent;font-style:normal;font-family:'times new roman','new york',times,serif;color:rgb(0,0,0);font-size:3px;font-weight:bold"><i><b><font size="3" face="times new roman, new york, times, serif">* Simone Daniela Sartorio</font></b></i></div><div><font face="times new roman, new york, times, serif">* <span style="white-space:pre-wrap"> </span>Professora Adjunta I no CCA/UFSCar, Araras/SP.</font></div><div><font face="times new roman, new york, times, serif">*<span style="white-space:pre-wrap"> </span>Doutora e Mestre em Estatística e Experimentação Agronômica - ESALQ/USP.</font></div><div><font face="times new roman, new york, times, serif">* <span style="white-space:pre-wrap"> </span>Licenciada em Matemática - UNESP/Rio Claro.</font></div><div><font face="times new roman, new york, times, serif">* <span style="white-space:pre-wrap"> </span>Contatos: </font></div><div style="color:rgb(0,0,0);font-size:13px;font-family:'times new roman','new york',times,serif;background-color:transparent;font-style:normal"><font face="times new roman, new york, times, serif">*<span style="white-space:pre-wrap"> </span>tel: (19)3543-2614, ramal 2664</font></div><div style="color:rgb(0,0,0);font-size:13px;font-family:'times new roman','new york',times,serif;background-color:transparent;font-style:normal"><font face="times new roman, new york, times, serif">*<span style="white-space:pre-wrap"> </span>cel: (19)98182-0586 - Tim</font></div><div style="color:rgb(0,0,0);font-size:13px;font-family:'times new roman','new york',times,serif;background-color:transparent;font-style:normal"><b style="line-height:1.22"><i><font size="3" face="Times New Roman">***---***---***---***---***---***---***---***---***---***---***---***---***</font></i></b></div><div style="background-color:transparent;font-style:normal;font-family:'Times New Roman';color:rgb(0,0,0);font-size:3px;font-weight:bold"><b><font size="3" face="Times New Roman"><font color="#bf00bf" size="1"><span style="font-family:'times new roman'"><i></i></span></font></font><div><font size="3" face="Times New Roman"><i><span><span><var></var> <span> <span> <span> <span> <span> <span> <span> <span> <span> <span> <span> <span> <span> <span> <span> <span> <span> <span> <span> <span> <span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>Tenha um bom dia! </i><font face="Courier New, courier, monaco, monospace, sans-serif">;)</font></font></div></b></div></div></div></div></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>