<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:13px"><div id="yui_3_16_0_1_1422981868695_7003" dir="ltr"><span id="yui_3_16_0_1_1422981868695_7082">Tem a função anti_join() do pacote dplyr:</span></div><div id="yui_3_16_0_1_1422981868695_7003" dir="ltr"><span><br></span></div><div id="yui_3_16_0_1_1422981868695_7003" dir="ltr"><span id="yui_3_16_0_1_1422981868695_7131">library(dplyr)<br></span></div><div id="yui_3_16_0_1_1422981868695_7003" dir="ltr"><span><br></span></div><div id="yui_3_16_0_1_1422981868695_7003" dir="ltr"><span id="yui_3_16_0_1_1422981868695_7130">anti_join(a1, a2, by = c('a', 'b'))<br></span></div><div id="yui_3_16_0_1_1422981868695_7003" dir="ltr"><span><br></span></div><div id="yui_3_16_0_1_1422981868695_7003" dir="ltr"><span><br></span></div><div id="yui_3_16_0_1_1422981868695_7003" dir="ltr"><span><br></span></div><div id="yui_3_16_0_1_1422981868695_7003" dir="ltr"><span>Att.,</span></div><div id="yui_3_16_0_1_1422981868695_7003" dir="ltr">Rubem</div><br> <div style="font-family: Courier New, courier, monaco, monospace, sans-serif; font-size: 13px;" id="yui_3_16_0_1_1422981868695_7006"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_1_1422981868695_7005"> <div dir="ltr" id="yui_3_16_0_1_1422981868695_7004"> <hr size="1" id="yui_3_16_0_1_1422981868695_7129"> <font size="2" face="Arial" id="yui_3_16_0_1_1422981868695_7007"> <b><span style="font-weight:bold;">De:</span></b> Alexandre Santos <alexandresantosbr@yahoo.com.br><br> <b><span style="font-weight: bold;">Para:</span></b> "r-br@listas.c3sl.ufpr.br" <r-br@listas.c3sl.ufpr.br> <br> <b id="yui_3_16_0_1_1422981868695_7113"><span style="font-weight: bold;" id="yui_3_16_0_1_1422981868695_7112">Enviadas:</span></b> Terça-feira, 3 de Fevereiro de 2015 12:23<br> <b id="yui_3_16_0_1_1422981868695_7111"><span style="font-weight: bold;" id="yui_3_16_0_1_1422981868695_7110">Assunto:</span></b> [R-br] Comparação entre dois data frames<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_1_1422981868695_7008"><br><div id="yiv0090096234"><div id="yui_3_16_0_1_1422981868695_7010"><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;" id="yui_3_16_0_1_1422981868695_7009"><div class="yiv0090096234signature" id="yiv0090096234yui_3_16_0_1_1422969959852_3597"><div align="center" id="yiv0090096234yui_3_16_0_1_1422969959852_3596"><span style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:12.8000001907349px;" class="yiv0090096234" id="yiv0090096234yui_3_16_0_1_1422969959852_3709">Bom dia Pessoal,</span><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:12.8000001907349px;" class="yiv0090096234" id="yiv0090096234yui_3_16_0_1_1422969959852_3659"><br class="yiv0090096234" style=""></div><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:12.8000001907349px;" class="yiv0090096234" id="yiv0090096234yui_3_16_0_1_1422969959852_3658"> Se quero separar somente os elementos em comum entre dois data frames hipotéticos, uso merge, sendo:</div><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:12.8000001907349px;" class="yiv0090096234" id="yiv0090096234yui_3_16_0_1_1422969959852_3651"><div class="yiv0090096234" style="" id="yiv0090096234yui_3_16_0_1_1422969959852_3650">a1 <- data.frame(a = 1:5, b=letters[1:5])</div><div class="yiv0090096234" style="" id="yiv0090096234yui_3_16_0_1_1422969959852_3652">a2 <- data.frame(a = 1:3, b=letters[1:3])</div><div class="yiv0090096234" style="" id="yiv0090096234yui_3_16_0_1_1422969959852_3653">merge(a1,a2)</div><div class="yiv0090096234" style="" id="yiv0090096234yui_3_16_0_1_1422969959852_3654">a1</div><div class="yiv0090096234" style="" id="yiv0090096234yui_3_16_0_1_1422969959852_3655">a2</div></div><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:12.8000001907349px;" class="yiv0090096234" id="yiv0090096234yui_3_16_0_1_1422969959852_3656"><br class="yiv0090096234" style=""></div><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:12.8000001907349px;" class="yiv0090096234" id="yiv0090096234yui_3_16_0_1_1422969959852_3657">Mas e para separar somente os elementos desiguais entre os dois data frames, o que eu poderia utilizar?</div><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:12.8000001907349px;" class="yiv0090096234" id="yiv0090096234yui_3_16_0_1_1422969959852_3710"><br class="yiv0090096234" style=""></div><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:12.8000001907349px;" class="yiv0090096234" id="yiv0090096234yui_3_16_0_1_1422969959852_3711">Obrigado,</div><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:12.8000001907349px;" class="yiv0090096234" id="yiv0090096234yui_3_16_0_1_1422969959852_3712"><br class="yiv0090096234" style=""></div><div style="color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:12.8000001907349px;" class="yiv0090096234" id="yiv0090096234yui_3_16_0_1_1422969959852_3714"><pre class="yiv0090096234" style="" id="yiv0090096234yui_3_16_0_1_1422969959852_3713">--
============================== ============================== ==========
Alexandre dos Santos
Proteção Florestal
IFMT - Instituto Federal de Educação, Ciência e Tecnologia de Mato Grosso
Campus Cáceres
Caixa Postal 244
Avenida dos Ramires, s/n
Bairro: Distrito Industrial
Cáceres - MT CEP: 78.200-000
Fone: <a rel="nofollow" style="color:rgb(17, 85, 204);" class="yiv0090096234 removed-link" id="yiv0090096234yui_3_16_0_1_1422969959852_3715" href="">(+55) 65 8132-8112</a> (TIM) <a rel="nofollow" style="color:rgb(17, 85, 204);" class="yiv0090096234 removed-link" id="yiv0090096234yui_3_16_0_1_1422969959852_3728" href="">(+55) 65 9686-6970</a> (VIVO)
<a rel="nofollow" ymailto="mailto:e-mails:alexandresantosbr@yahoo.com.br" target="_blank" style="color:rgb(17, 85, 204);" class="yiv0090096234 removed-link" id="yiv0090096234yui_3_16_0_1_1422969959852_3716" href="">e-mails:alexandresantosbr@ yahoo.com.br</a>
<a rel="nofollow" ymailto="mailto:alexandre.santos@cas.ifmt.edu.br" target="_blank" style="color:rgb(17, 85, 204);" class="yiv0090096234 removed-link" id="yiv0090096234yui_3_16_0_1_1422969959852_3717" href="">alexandre.santos@cas.ifmt.edu. br</a>
Lattes: <a rel="nofollow" target="_blank" style="color:rgb(17, 85, 204);" class="yiv0090096234 removed-link" href="">http://lattes.cnpq.br/ 1360403201088680</a>
============================== ============================== ==========</pre></div></div></div></div></div></div><br>_______________________________________________<br>R-br mailing list<br><a ymailto="mailto:R-br@listas.c3sl.ufpr.br" class="removed-link" href="">R-br@listas.c3sl.ufpr.br</a><br><a target="_blank" class="removed-link" href="">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br>Leia o guia de postagem (<a target="_blank" class="removed-link" href="">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br><br></div> </div> </div> </div></body></html>