<div dir="ltr"><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small;color:rgb(51,51,51)">​Uma solução é em uma variavel nova remover todos os espaços e fazer a mesma análise.</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small;color:rgb(51,51,51)"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small;color:rgb(51,51,51)">para remover espacos</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small;color:rgb(51,51,51)"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small;color:rgb(51,51,51)">variavel_nova <- gsub(" ","", variavel_velha)​</div></div><div class="gmail_extra"><br><div class="gmail_quote">Em 20 de fevereiro de 2017 16:03, Amiko Bh via R-br <span dir="ltr"><<a href="mailto:r-br@listas.c3sl.ufpr.br" target="_blank">r-br@listas.c3sl.ufpr.br</a>></span> escreveu:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
<p style="margin-bottom:0cm;line-height:100%"><font style="font-size:10pt" size="2">Pessoal:</font></p>
<p style="margin-bottom:0cm;line-height:100%">

</p>
<p style="margin-bottom:0cm;line-height:100%"><font style="font-size:10pt" size="2">Dado
o DF, com o seguinte nomes fictícios:</font></p>
<p style="margin-bottom:0cm;line-height:100%">

</p>
<table width="423" cellpadding="2" cellspacing="0">
        <colgroup><col width="207">
        <col width="208">
        </colgroup><tbody><tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="center"><font style="font-size:10pt" size="2"><b>NOME</b></font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="center"><font style="font-size:10pt" size="2"><b>FILIACAO</b></font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AENDER
                        XXXXX AMORIM </font>
                        </p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">APARECIDA
                        XXXXX AMORIM</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AGAPE XXXXX
                        SILVA</font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">MARISA
                        IRENEIA DE SOUZA SILVA</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AGATIL
                        XXXXX OLIVEIRA </font>
                        </p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">VANESSA
                        XXXXX DA COSTA</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AGATIL
                        XXXXX OLIVEIRA</font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">VANESSA
                        XXXXX DA COSTA</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AGATIL
                        XXXXX OLIVEIRA </font>
                        </p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">VANESSA
                        XXXXX DA COSTA</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AGNALDO
                        XXXXX SANTOS BORGES</font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">MIRTES
                        XXXXX LUCIANO</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AGUIDA
                        XXXXX LISBOA</font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">DIVA XXXXX
                        LISBOA</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AGUINALDO
                        XXXXX PAIXAO</font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">ROSANE
                        XXXXX PAIXAO</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AILTON
                        XXXXX DOS SANTOS</font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">PATRICIA
                        XXXXX ARAUJO</font></p>
                </td>
        </tr>
        <tr>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AILTON
                        XXXXX ESTEVES</font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" valign="bottom" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">MARIA XXXXX
                        ESTEVES</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AILTON
                        XXXXX JUNIOR</font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">FLAVIA
                        XXXXX MARTINS</font></p>
                </td>
        </tr>
</tbody></table>
<p style="margin-bottom:0cm;line-height:100%"><br>

</p>
<p style="margin-bottom:0cm;line-height:100%"><font style="font-size:10pt" size="2">Uso
o seguinte para cortar os nomes repetidos:</font></p>
<p style="margin-bottom:0cm;line-height:100%">

</p>
<p style="margin-bottom:0cm;line-height:100%"><font style="font-size:10pt" size="2">banco_sem_nome_repetido
<- df[!duplicated(data.frame(df$<wbr>NOME, df$FILIACAO)),]</font></p>
<p style="margin-bottom:0cm;line-height:100%">

</p>
<p style="margin-bottom:0cm;line-height:100%"><font style="font-size:10pt" size="2">Meu
problema: o script resulta o seguinte df:</font></p>
<p style="margin-bottom:0cm;line-height:100%">

</p>
<p style="margin-bottom:0cm;line-height:100%"><br>

</p>
<table width="423" cellpadding="2" cellspacing="0">
        <colgroup><col width="207">
        <col width="208">
        </colgroup><tbody><tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="center"><font style="font-size:10pt" size="2"><b>NOME</b></font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="center"><font style="font-size:10pt" size="2"><b>FILIACAO</b></font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AENDER
                        XXXXX AMORIM </font>
                        </p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">APARECIDA
                        XXXXX AMORIM</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AGAPE XXXXX
                        SILVA</font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">MARISA
                        IRENEIA DE SOUZA SILVA</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AGATIL
                        XXXXX OLIVEIRA </font>
                        </p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">VANESSA
                        XXXXX DA COSTA</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AGATIL
                        XXXXX OLIVEIRA</font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">VANESSA
                        XXXXX DA COSTA</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AGNALDO
                        XXXXX SANTOS BORGES</font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">MIRTES
                        XXXXX LUCIANO</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AGUIDA
                        XXXXX LISBOA</font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">DIVA XXXXX
                        LISBOA</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AGUINALDO
                        XXXXX PAIXAO</font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">ROSANE
                        XXXXX PAIXAO</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AILTON
                        XXXXX DOS SANTOS</font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">PATRICIA
                        XXXXX ARAUJO</font></p>
                </td>
        </tr>
        <tr>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AILTON
                        XXXXX ESTEVES</font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" valign="bottom" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">MARIA XXXXX
                        ESTEVES</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AILTON
                        XXXXX JUNIOR</font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="208">
                        <p align="left"><font style="font-size:10pt" size="2">FLAVIA
                        XXXXX MARTINS</font></p>
                </td>
        </tr>
</tbody></table>
<p style="margin-bottom:0cm;line-height:100%">

</p>
<p style="margin-bottom:0cm;line-height:100%"><font style="font-size:10pt" size="2">Observe-se
que:</font></p>
<p style="margin-bottom:0cm;line-height:100%">

</p>
<table width="401" cellpadding="2" cellspacing="0">
        <colgroup><col width="207">
        <col width="185">
        </colgroup><tbody><tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AGATIL
                        XXXXX OLIVEIRA </font>
                        </p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="185">
                        <p align="left"><font style="font-size:10pt" size="2">VANESSA
                        XXXXX DA COSTA</font></p>
                </td>
        </tr>
        <tr valign="bottom">
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" height="13" width="207">
                        <p align="left"><font style="font-size:10pt" size="2">AGATIL
                        XXXXX OLIVEIRA</font></p>
                </td>
                <td style="border-top:medium none;border-bottom:medium none;padding-top:0cm;padding-bottom:0cm" width="185">
                        <p align="left"><font style="font-size:10pt" size="2">VANESSA
                        XXXXX DA COSTA</font></p>
                </td>
        </tr>
</tbody></table>
<p style="margin-bottom:0cm;line-height:100%">

</p>
<p style="margin-bottom:0cm;line-height:100%"><font style="font-size:10pt" size="2">Não
é cortada a linha porque após o OLIVEIRA tem um espaço.</font></p>
<p style="margin-bottom:0cm;line-height:100%">

</p>
<p style="margin-bottom:0cm;line-height:100%"><font style="font-size:10pt" size="2">O
banco é enorme e tem vários casos iguais ao citado. Alguma solução?</font></p>
</div>
<br>______________________________<wbr>_________________<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/<wbr>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-<wbr>guia</a>) e forneça código mínimo reproduzível.<br></blockquote></div><br></div>