<div dir="ltr">Veja se isso te ajuda:<br><div><br>> lista <- doBy::splitBy(formula = ~ V2, data = arq_1)<br><br></div><div>att,<br></div><div>FH<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 23 October 2015 at 13:31, Paulo Henrique Pimenta <span dir="ltr"><<a href="mailto:paulopimenta6@hotmail.com" target="_blank">paulopimenta6@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div dir="ltr" style="font-family:'Calibri','Segoe UI','Meiryo','Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic','sans-serif';font-size:12pt"><div>Olá Listeiros,</div><div><br></div><div>Estou com um problema na criação de novas listas no R. Abaixo segue parte do meu código:<br><br>arq_1 <- read.table("C:/Users/Paulo/Documents/Alturas_Ilha_Fiscal-2015-10-22/Alturas_Ilha_Fiscal/50140002560102196123121961ALT_MOD.xls")<br></div><div><br></div><div>######################################################################################################## Fazendo a mao mes a mes ####################<br></div><div><br></div><div>jan <- arq_1[which(arq_1$V2==1),]<br>fev <- arq_1[which(arq_1$V2==2),]<br>mar <- arq_1[which(arq_1$V2==3),]<br>abril <- arq_1[which(arq_1$V2==4),]<br>maio <- arq_1[which(arq_1$V2==5),]<br>junho <- arq_1[which(arq_1$V2==6),]<br>julho <- arq_1[which(arq_1$V2==7),]<br>agosto <- arq_1[which(arq_1$V2==8),]<br>setembro <- arq_1[which(arq_1$V2==9),]<br>outubro <- arq_1[which(arq_1$V2==10),]<br>novembro <- arq_1[which(arq_1$V2==11),]<br>dezembro <- arq_1[which(arq_1$V2==12),]</div><div><br></div><div>################automatizando#####################</div><div><br></div><div>for (i in 1:12){</div><div><br></div><div>mes[i] <- arq_1[which(arq_1$V2==i),]<br>             <br>               }<br><br>Eu gostaria de poder automatizar o primeiro processo, a captação de um bloco da lista arq_1 para a variável mes[i], porém eu recebo a mensagem:<br><br>There were 12 warnings (use warnings() to see them)</div><div><br></div><div>e ao abrir os warnings:<br><br>Warning messages:<br>1: In mes[i] <- arq_1[which(arq_1$V2 == i), ] :<br>  number of items to replace is not a multiple of replacement length<br>2: In mes[i] <- arq_1[which(arq_1$V2 == i), ] :<br>  number of items to replace is not a multiple of replacement length<br>3: In mes[i] <- arq_1[which(arq_1$V2 == i), ] :<br>  number of items to replace is not a multiple of replacement length<br>4: In mes[i] <- arq_1[which(arq_1$V2 == i), ] :<br>  number of items to replace is not a multiple of replacement length<br>5: In mes[i] <- arq_1[which(arq_1$V2 == i), ] :<br>  number of items to replace is not a multiple of replacement length<br>6: In mes[i] <- arq_1[which(arq_1$V2 == i), ] :<br>  number of items to replace is not a multiple of replacement length<br>7: In mes[i] <- arq_1[which(arq_1$V2 == i), ] :<br>  number of items to replace is not a multiple of replacement length<br>8: In mes[i] <- arq_1[which(arq_1$V2 == i), ] :<br>  number of items to replace is not a multiple of replacement length<br>9: In mes[i] <- arq_1[which(arq_1$V2 == i), ] :<br>  number of items to replace is not a multiple of replacement length<br>10: In mes[i] <- arq_1[which(arq_1$V2 == i), ] :<br>  number of items to replace is not a multiple of replacement length<br>11: In mes[i] <- arq_1[which(arq_1$V2 == i), ] :<br>  number of items to replace is not a multiple of replacement length<br>12: In mes[i] <- arq_1[which(arq_1$V2 == i), ] :<br>  number of items to replace is not a multiple of replacement length<br><br>Fazendo pelo processo manual dá certo, mas pq fazendo pelo processo “automatizado" não é possível. Peço ajuda de vocês para encontrar uma saída!<br><br>Um grande abraço a todos<br><br>Paulo.<br><br><br></div><div><div><br></div><div>Sent from Windows Mail</div><div><br></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" rel="noreferrer" 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" rel="noreferrer" 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>