<html><head></head><body><div class="ydp6aa2cbb9yahoo-style-wrap" style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div><span><div style="font-family: bookman old style, new york, times, serif; font-size: 16px;">Bom dia lista!!!</div><div style="font-family: bookman old style, new york, times, serif; font-size: 16px;"><br clear="none"></div><div style="font-family: bookman old style, new york, times, serif; font-size: 16px;">Seguinte, Criei esse exemplo aqui para ajudar no entendimento da minha dúvida:</div><div style="font-family: bookman old style, new york, times, serif; font-size: 16px;"><br clear="none"></div><div style="font-family: bookman old style, new york, times, serif; font-size: 16px;"><font color="#9d1811">setwd("C:/Users/diogo/Desktop/testeR")<br clear="none"></font></div><div style="font-family: bookman old style, new york, times, serif; font-size: 16px;"><div><font color="#9d1811">getwd()</font></div><div><font color="#9d1811"><br clear="none"></font></div><div><font color="#9d1811">nomes <- c("Diogo", "Rodrigo", "Isabel", "Marcelo","Sarah")</font></div><div><font color="#9d1811">idades <- c(40, 42, 26, 32, 28)</font></div><div><font color="#9d1811">tabela1 <- data.frame(nome = nomes, idade = idades)</font></div><div><font color="#9d1811">write.csv(tabela1, "arq1.csv", row.names = FALSE)</font></div><div><font color="#9d1811"><br clear="none"></font></div><div><font color="#9d1811">nomes <- c("Antônio", "Letícia", "Cláudio", "Ana Paula","Luiza")</font></div><div><font color="#9d1811">idades <- c(50, 26, 40, 25, 32)</font></div><div><font color="#9d1811">tabela2 <- data.frame(nome = nomes, idade = idades)</font></div><div><font color="#9d1811">write.csv(tabela2, " arq2.csv", row.names = FALSE)</font></div><div><font color="#9d1811"><br clear="none"></font></div><div><font color="#9d1811">nomes <- c("Maria Clara", "Ana Maria", "Bianca", "Lidiane","Anderson")</font></div><div><font color="#9d1811">idades <- c(32, 32, 30, 34, 29)</font></div><div><font color="#9d1811">tabela3 <- data.frame(nome = nomes, idade = idades)</font></div><div><font color="#9d1811">write.csv(tabela3, " arq3.csv", row.names = FALSE)</font></div><div><font color="#9d1811"><br clear="none"></font></div><div><font color="#9d1811">lista=list.files()</font></div><div><br clear="none"></div>O comando criou esses arquivos csv de exemplo, onde eles salvam no diretório de trabalho "testeR". Eu reúno esses arquivos por meio dessa função (usei de apoio o dplyr):</div><div style="font-family: bookman old style, new york, times, serif; font-size: 16px;"><br clear="none"></div><div style="font-family: bookman old style, new york, times, serif; font-size: 16px;"><div><font color="#4c76a2"><b>lista<-list.files()</b></font></div><div><font color="#4c76a2"><b>arquivos <- lapply(lista, function(x) read.csv2(x, header=TRUE, sep=";")) </b></font></div><div><font color="#4c76a2"><b>dados    <- do.call("rbind", arquivos) </b></font></div><div><br clear="none"></div><div><span style="color: rgb(0, 0, 0);">Se eu aplicar essa função, ela vai reunir <b>todos</b> os arquivos (arq1.arq2 e arq3).</span><br clear="none"></div><div><span style="color: rgb(0, 0, 0);"><br clear="none"></span></div><div><span style="color: rgb(0, 0, 0);">Minha dúvida: </span><b>eu gostaria de aplicá-la, de forma a juntar somente "parte" dos arquivos</b> (ex: arq1 com arq3, por exemplo).</div><div><br clear="none"></div><div>Alguém poderia dar uma informação ou ajuda a responder essa dúvida?</div><div><br clear="none"></div><div>Obrigado e bom dia!!!</div></div></span></div><div><br></div><div class="ydp6aa2cbb9signature"><div style="font-family:Helvetica, Arial, sans-serif;font-size:16px;"><div style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;"><i id="ydpcf278505yui_3_16_0_1_1497025264182_38508"><span id="ydpcf278505yui_3_16_0_1_1497025264182_38507" style="color:rgb(0, 0, 191);font-size:medium;"><font face="Courier New, courier, monaco, monospace, sans-serif">Diogo Jerônimo</font></span></i></div><div style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;"><i id="ydpcf278505yui_3_16_0_1_1497025264182_38430"><span id="ydpcf278505yui_3_16_0_1_1497025264182_38429" style="color:rgb(0, 0, 191);font-size:medium;"><font face="Courier New, courier, monaco, monospace, sans-serif">Bacharel em Ciências Estatísticas - ENCE/IBGE</font></span></i></div><div style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;"><i id="ydpcf278505yui_3_16_0_1_1497025264182_38309"><span id="ydpcf278505yui_3_16_0_1_1497025264182_38308" style="color:rgb(0, 0, 191);font-size:medium;"><font face="Courier New, courier, monaco, monospace, sans-serif">Mestre em Metrologia - PUC-Rio/PósMQI</font></span></i></div><div style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;"><i id="ydpcf278505yui_3_16_0_1_1497025264182_38329"><span id="ydpcf278505yui_3_16_0_1_1497025264182_38328" style="color:rgb(0, 0, 191);font-size:medium;"><font face="Courier New, courier, monaco, monospace, sans-serif" id="ydpcf278505yui_3_16_0_1_1497025264182_38700">CONRE: 8514 - SÉRIE A</font></span></i></div><div style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;"><i id="ydpcf278505yui_3_16_0_1_1497025264182_38318"><span id="ydpcf278505yui_3_16_0_1_1497025264182_38317" style="color:rgb(0, 0, 191);font-size:medium;"><font face="Courier New, courier, monaco, monospace, sans-serif" id="ydpcf278505yui_3_16_0_1_1497025264182_38696">Email: diogojose21@yahoo.com.br</font></span></i></div><div style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;"><i id="ydpcf278505yui_3_16_0_1_1497025264182_38323"><span id="ydpcf278505yui_3_16_0_1_1497025264182_38322" style="line-height:17.12px;color:rgb(0, 0, 191);font-size:medium;"><font face="Courier New, courier, monaco, monospace, sans-serif" id="ydpcf278505yui_3_16_0_1_1497025264182_38695">http://lattes.cnpq.br/8996149312896520</font></span></i></div></div></div></div></body></html>