<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Olá FHRB,<div><br></div><div>A solução <span style="font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13.44px; background-color: rgb(255, 255, 255);"> lista <- doBy::splitBy(formula = ~ V2, data = arq_1) parece interessante, no entanto o computador que eu uso não possui para mim acesso para realizar atualizações, assim o pacote doBy não pode ser usado, ele não esta disponível para a versão 2.14.1 do R</span></div><div><font face="Verdana, Geneva, Helvetica, Arial, sans-serif"><span style="font-size: 13.44px;"><br></span></font></div><div><font face="Verdana, Geneva, Helvetica, Arial, sans-serif"><span style="font-size: 13.44px;">Abraços.<br></span></font><br>Paulo Henrique de A. S. Pimenta.<div><br></div><div>Graduando em Meteorologia (Bacharelado) - IAG/USP.<br>Fone: +5511981318435.</div><br><br><div><hr id="stopSpelling">From: paulopimenta6@hotmail.com<br>To: r-br@listas.c3sl.ufpr.br<br>Subject: Problemas com criação de listas<br>Date: Fri, 23 Oct 2015 18:31:56 +0000<br><br>



<style data-externalstyle="true">
.ExternalClass p.ecxMsoListParagraph, .ExternalClass li.ecxMsoListParagraph, .ExternalClass div.ecxMsoListParagraph {
}

.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal {
}

.ExternalClass p.ecxMsoListParagraphCxSpFirst, .ExternalClass li.ecxMsoListParagraphCxSpFirst, .ExternalClass div.ecxMsoListParagraphCxSpFirst, .ExternalClass p.ecxMsoListParagraphCxSpMiddle, .ExternalClass li.ecxMsoListParagraphCxSpMiddle, .ExternalClass div.ecxMsoListParagraphCxSpMiddle, .ExternalClass p.ecxMsoListParagraphCxSpLast, .ExternalClass li.ecxMsoListParagraphCxSpLast, .ExternalClass div.ecxMsoListParagraphCxSpLast {
line-height:115%;
}

</style>

<div data-externalstyle="false" 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 data-signatureblock="true"><div><br></div><div>Sent from Windows Mail</div><div><br></div></div></div></div></div>                                           </div></body>
</html>