<html><head></head><body><div class="ydp7173d87fyahoo-style-wrap" style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div><div dir="ltr" data-setdir="false">Prezado professor, resolveu, já estava com cabelo branco aqui rs... Muito obrigado e ótima tarde!!!</div><div><br></div><div class="ydp7173d87fsignature"><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" style="background-color: inherit;">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" style="background-color: inherit;">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" style="background-color: inherit;">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" style="background-color: inherit;">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" style="background-color: inherit;">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" style="background-color: inherit;">http://lattes.cnpq.br/8996149312896520</font></span></i></div></div></div></div>
        <div><br></div>
        
        </div><div id="ydp7bd59b67yahoo_quoted_5905286038" class="ydp7bd59b67yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    Em segunda-feira, 25 de outubro de 2021 13:55:42 BRT, Marcus Nunes <marcus.nunes@gmail.com> escreveu:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="ydp7bd59b67yiv7641342406"><div><div dir="ltr"><div>Olá,</div><div><br clear="none"></div><div>Use o código a seguir para resolver o seu problema:</div><div><br clear="none"></div><div>### inicio do codigo<br clear="none"></div><div>teste<-c(rep("EIA/EF/EQ/Q (Índice) IgG - Valor (DO/CO, Índice)",3),rep("EIA/EF/EQ/Q (U/mL) IgG - Valor (U/mL)",5))<br clear="none">teste <- data.frame(teste)<br clear="none"><br clear="none">library(tidyverse)<br clear="none"><br clear="none">teste %>%<br clear="none">  mutate(teste_limpo = str_replace_all(teste, "EIA/EF/EQ/Q \\(U/mL\\)", ""))</div><div>### fim do codigo</div><div><br clear="none"></div><div>Também seria possível resolver o problema sem apelar para o tidyverse:</div><div><br clear="none"></div><div>### inicio do codigo</div><div>gsub("EIA/EF/EQ/Q \\(U/mL\\)","",teste$teste)</div><div>### fim do codigo</div><div><br clear="none"></div><div>O problema de utilizar "(" ou ")" diretamente, sem usar os caracteres de escape (ou seja, "\\(" ou "\\)") é que os comandos str_replace_all e gsub entendem isso como uma expressão regular, criando assim um grupo de caracteres e não fazendo a limpeza da maneira esperada originalmente.<br clear="none"></div><div><br clear="none"></div><div>Atenciosamente,<br clear="none"></div><div><div><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">--</div><div dir="ltr"><div dir="ltr">Marcus Nunes</div><div dir="ltr">Professor Adjunto</div><div dir="ltr"><div dir="ltr"><a shape="rect" href="https://marcusnunes.me/" rel="nofollow" target="_blank">https://marcusnunes.me/</a></div></div><div dir="ltr">Universidade Federal do Rio Grande do Norte</div><div dir="ltr">Departamento de Estatística</div><div dir="ltr">Laboratório de Estatística Aplicada - <a shape="rect" href="http://lea.estatistica.ccet.ufrn.br/" rel="nofollow" target="_blank">http://lea.estatistica.ccet.ufrn.br</a></div><div>Curso de Big Data - <a shape="rect" href="https://introbigdata.org" rel="nofollow" target="_blank">https://introbigdata.org</a><br clear="none"></div><div dir="ltr">Aplicações em Shiny - <a shape="rect" href="http://shiny.estatistica.ccet.ufrn.br" rel="nofollow" target="_blank">http://shiny.estatistica.ccet.ufrn.br</a></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br clear="none"></div></div></div><br clear="none"><div class="ydp7bd59b67yiv7641342406gmail_quote"><div class="ydp7bd59b67yiv7641342406yqt6476397452" id="ydp7bd59b67yiv7641342406yqt30731"><div class="ydp7bd59b67yiv7641342406gmail_attr" dir="ltr">On Mon, Oct 25, 2021 at 1:32 PM Diogo Jerônimo por (R-br) <<a shape="rect" href="mailto:r-br@listas.c3sl.ufpr.br" rel="nofollow" target="_blank">r-br@listas.c3sl.ufpr.br</a>> wrote:<br clear="none"></div><blockquote class="ydp7bd59b67yiv7641342406gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div dir="ltr"><div><div dir="ltr">Boa tarde prezados!!! Parece um do "ridículas", mas não consegui resolver. Segue o vetor de exemplo:</div><div><br clear="none"></div><div dir="ltr"> <div><div><font color="#4c76a2">teste<-c(rep("EIA/EF/EQ/Q (Índice) IgG - Valor (DO/CO, Índice)",3),rep("EIA/EF/EQ/Q (U/mL) IgG - Valor (U/mL)",5))</font></div><div><font color="#4c76a2">data.frame(teste)</font></div><div><br clear="none"></div></div></div><div dir="ltr">Eu preciso <b>apagar</b> os trechos do meu data.frame onde aparece o termo <font color="#cd232c">"<span style="font-family:bookman old style, new york, times, serif;font-size:16px;">EIA/EF/EQ/Q (U/mL)</span>"</font>. Tentei usar o comando abaixo:<br clear="none"></div><div><br clear="none"></div><div dir="ltr"> <span><font style="background-color:inherit;" color="#4c76a2">gsub("EIA/EF/EQ/Q (U/mL)","",teste)</font></span><br clear="none"></div></div><br clear="none"></div><div dir="ltr">mas não obtive sucesso. Alguém teria uma ideia de onde estou errando, ou se tem algum comando melhor no tidyverse ou dplyr para fazer isso?</div><div dir="ltr"><br clear="none"></div><div dir="ltr">Obrigado!!! </div><div><br clear="none"></div><div><div style="font-family:Helvetica, Arial, sans-serif;font-size:16px;"><div style="margin-bottom: 0.0001pt; padding: 0px; line-height: normal; background-image: none; background-size: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: white;"><i id="ydp7bd59b67yiv7641342406gmail-m_3451155766903368178gmail-m_-7584106581630298904ydpcf278505yui_3_16_0_1_1497025264182_38508"><span id="ydp7bd59b67yiv7641342406gmail-m_3451155766903368178gmail-m_-7584106581630298904ydpcf278505yui_3_16_0_1_1497025264182_38507" style="color:rgb(0,0,191);font-size:medium;"><font style="background-color:inherit;" 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-image: none; background-size: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: white;"><i id="ydp7bd59b67yiv7641342406gmail-m_3451155766903368178gmail-m_-7584106581630298904ydpcf278505yui_3_16_0_1_1497025264182_38430"><span id="ydp7bd59b67yiv7641342406gmail-m_3451155766903368178gmail-m_-7584106581630298904ydpcf278505yui_3_16_0_1_1497025264182_38429" style="color:rgb(0,0,191);font-size:medium;"><font style="background-color:inherit;" 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-image: none; background-size: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: white;"><i id="ydp7bd59b67yiv7641342406gmail-m_3451155766903368178gmail-m_-7584106581630298904ydpcf278505yui_3_16_0_1_1497025264182_38309"><span id="ydp7bd59b67yiv7641342406gmail-m_3451155766903368178gmail-m_-7584106581630298904ydpcf278505yui_3_16_0_1_1497025264182_38308" style="color:rgb(0,0,191);font-size:medium;"><font style="background-color:inherit;" 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-image: none; background-size: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: white;"><i id="ydp7bd59b67yiv7641342406gmail-m_3451155766903368178gmail-m_-7584106581630298904ydpcf278505yui_3_16_0_1_1497025264182_38329"><span id="ydp7bd59b67yiv7641342406gmail-m_3451155766903368178gmail-m_-7584106581630298904ydpcf278505yui_3_16_0_1_1497025264182_38328" style="color:rgb(0,0,191);font-size:medium;"><font id="ydp7bd59b67yiv7641342406gmail-m_3451155766903368178gmail-m_-7584106581630298904ydpcf278505yui_3_16_0_1_1497025264182_38700" style="background-color:inherit;" face="Courier New, courier, monaco, monospace, sans-serif">CONRE: 8514 - SÉRIE A</font></span></i></div><div style="margin-bottom: 0.0001pt; padding: 0px; line-height: normal; background-image: none; background-size: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: white;"><i id="ydp7bd59b67yiv7641342406gmail-m_3451155766903368178gmail-m_-7584106581630298904ydpcf278505yui_3_16_0_1_1497025264182_38323"><span id="ydp7bd59b67yiv7641342406gmail-m_3451155766903368178gmail-m_-7584106581630298904ydpcf278505yui_3_16_0_1_1497025264182_38322" style="line-height:17.12px;color:rgb(0,0,191);font-size:medium;"><font id="ydp7bd59b67yiv7641342406gmail-m_3451155766903368178gmail-m_-7584106581630298904ydpcf278505yui_3_16_0_1_1497025264182_38695" style="background-color:inherit;" face="Courier New, courier, monaco, monospace, sans-serif"><a shape="rect" href="http://lattes.cnpq.br/8996149312896520" rel="nofollow" target="_blank">http://lattes.cnpq.br/8996149312896520</a></font></span></i><br clear="none"></div></div></div></div></div>_______________________________________________<br clear="none">
R-br mailing list<br clear="none">
<a shape="rect" href="mailto:R-br@listas.c3sl.ufpr.br" rel="nofollow" target="_blank">R-br@listas.c3sl.ufpr.br</a><br clear="none">
<a shape="rect" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" rel="nofollow" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br clear="none">
Leia o guia de postagem (<a shape="rect" href="http://www.leg.ufpr.br/r-br-guia" rel="nofollow" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br clear="none">
</blockquote></div></div>
</div></div></div>
            </div>
        </div></body></html>