<html><head></head><body><div class="ydpee25b74ayahoo-style-wrap" style="font-family: bookman old style, new york, times, serif; font-size: 16px;"><div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Prezados Daniel, César e Fernando, agradeço pela atenção!!! Baseado nas dicas de vocês, já resolvi meu problema!!! </div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Muito obrigado!!!!</div><div><br></div><div class="ydpee25b74asignature"><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_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><br></div>
        
        </div><div id="ydp13d0ab58yahoo_quoted_7173665769" class="ydp13d0ab58yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    Em quarta-feira, 5 de agosto de 2020 23:04:30 BRT, Daniel Guimarães Tiezzi <dtiezzi@usp.br> escreveu:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="ydp13d0ab58yiv7709312635"><div>Boa noite Jeronimo<div class="ydp13d0ab58yiv7709312635"><br clear="none" class="ydp13d0ab58yiv7709312635"></div><div class="ydp13d0ab58yiv7709312635">Acredito que você pode criar uma matrix e subtrair a matrix transversa do vetor.</div><div class="ydp13d0ab58yiv7709312635"><br clear="none" class="ydp13d0ab58yiv7709312635"></div><div class="ydp13d0ab58yiv7709312635"><div class="ydp13d0ab58yiv7709312635">a <- c(19,23,27,29)</div><div class="ydp13d0ab58yiv7709312635">m <- matrix(rep(a, length(a)), length(a))</div><div class="ydp13d0ab58yiv7709312635">rm <- t(a - t(m))</div><div class="ydp13d0ab58yiv7709312635"><br clear="none" class="ydp13d0ab58yiv7709312635"></div><div class="ydp13d0ab58yiv7709312635"> A parte triangular da matrix resultante tem os seus valores. Pode usar a função lower.tri() pra extrair seus valores </div><div class="ydp13d0ab58yiv7709312635"><br clear="none" class="ydp13d0ab58yiv7709312635"></div><div class="ydp13d0ab58yiv7709312635">abs(rm[lower.tri(rm, diag = FALSE)])</div><div class="ydp13d0ab58yiv7709312635"><br clear="none" class="ydp13d0ab58yiv7709312635"></div><div class="ydp13d0ab58yiv7709312635"><br clear="none" class="ydp13d0ab58yiv7709312635"></div><div class="ydp13d0ab58yiv7709312635">Veja se funciona</div><div class="ydp13d0ab58yiv7709312635"><br clear="none" class="ydp13d0ab58yiv7709312635"></div><div class="ydp13d0ab58yiv7709312635">Daniel</div><div class="ydp13d0ab58yiv7709312635"><br clear="none" class="ydp13d0ab58yiv7709312635"></div><div class="ydp13d0ab58yiv7709312635"><div class="ydp13d0ab58yiv7709312635" style="orphans:2;widows:2;">----------------------------------------------------------------<br clear="none" class="ydp13d0ab58yiv7709312635"><div class="ydp13d0ab58yiv7709312635"><div>Daniel Tiezzi, MD, PhD</div><div>Oncologia / Mastologia<br clear="none" class="ydp13d0ab58yiv7709312635">Professor Associado - Livre Docente<br clear="none" class="ydp13d0ab58yiv7709312635">Departamento de Ginecologia e Obstetrícia<br clear="none" class="ydp13d0ab58yiv7709312635">Setor de Mastologia e Oncologia Ginecológica<br clear="none" class="ydp13d0ab58yiv7709312635">Faculdade de Medicina de Ribeirão Preto - USP<br clear="none" class="ydp13d0ab58yiv7709312635">Tel.: 16 3602-2488<br clear="none" class="ydp13d0ab58yiv7709312635"><a shape="rect" class="ydp13d0ab58yiv7709312635" href="mailto:dtiezzi@usp.br" rel="nofollow" target="_blank">e-mail: dtiezzi@usp.br</a></div></div><div class="ydp13d0ab58yiv7709312635"><br clear="none" class="ydp13d0ab58yiv7709312635"></div></div></div><div><br clear="none" class="ydp13d0ab58yiv7709312635"><blockquote class="ydp13d0ab58yiv7709312635" type="cite"><div class="ydp13d0ab58yiv7709312635yqt3181203647" id="ydp13d0ab58yiv7709312635yqt61729"><div class="ydp13d0ab58yiv7709312635">On 5 Aug 2020, at 14:22, Diogo Jerônimo por (R-br) <<a shape="rect" class="ydp13d0ab58yiv7709312635" href="mailto:r-br@listas.c3sl.ufpr.br" rel="nofollow" target="_blank">r-br@listas.c3sl.ufpr.br</a>> wrote:</div><br clear="none" class="ydp13d0ab58yiv7709312635Apple-interchange-newline"><div class="ydp13d0ab58yiv7709312635"><div class="ydp13d0ab58yiv7709312635"><div class="ydp13d0ab58yiv7709312635ydpb2d3ed5dyahoo-style-wrap" style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div class="ydp13d0ab58yiv7709312635" dir="ltr">Boa tarde a todos. Seja por exemplo o seguinte vetor:</div><div class="ydp13d0ab58yiv7709312635" dir="ltr"><br clear="none" class="ydp13d0ab58yiv7709312635"></div><div class="ydp13d0ab58yiv7709312635" dir="ltr">x=(19,23,27,29)</div><div class="ydp13d0ab58yiv7709312635" dir="ltr"><div class="ydp13d0ab58yiv7709312635"><div class="ydp13d0ab58yiv7709312635" dir="ltr"><br clear="none" class="ydp13d0ab58yiv7709312635"></div><div class="ydp13d0ab58yiv7709312635" dir="ltr">É possível se obter no R um vetor com TODAS as diferenças absolutas entre TODOS os pares de valores combinados de um vetor? Ou seja:</div><div class="ydp13d0ab58yiv7709312635" dir="ltr"><br clear="none" class="ydp13d0ab58yiv7709312635"></div><div class="ydp13d0ab58yiv7709312635" dir="ltr">vetor=(|19-23|,<span class="ydp13d0ab58yiv7709312635"><span class="ydp13d0ab58yiv7709312635" style="font-family:old times, serif;font-size:16px;">|19-27|,</span></span><span class="ydp13d0ab58yiv7709312635"><span class="ydp13d0ab58yiv7709312635" style="font-family:old times, serif;font-size:16px;">|19-29|,</span></span><span class="ydp13d0ab58yiv7709312635"><span class="ydp13d0ab58yiv7709312635" style="font-family:old times, serif;font-size:16px;">|23-27|,<span class="ydp13d0ab58yiv7709312635"><span class="ydp13d0ab58yiv7709312635" style="font-family:old times, serif;font-size:16px;">|23-29|,<span class="ydp13d0ab58yiv7709312635"><span class="ydp13d0ab58yiv7709312635" style="font-family:old times, serif;font-size:16px;">|27-29|)</span></span></span></span></span></span></div><div class="ydp13d0ab58yiv7709312635" dir="ltr"><span class="ydp13d0ab58yiv7709312635"><span class="ydp13d0ab58yiv7709312635" style="font-family:old times, serif;font-size:16px;"><span class="ydp13d0ab58yiv7709312635"><span class="ydp13d0ab58yiv7709312635" style="font-family:old times, serif;font-size:16px;"><span class="ydp13d0ab58yiv7709312635"><span class="ydp13d0ab58yiv7709312635" style="font-family:old times, serif;font-size:16px;"><br clear="none" class="ydp13d0ab58yiv7709312635"></span></span></span></span></span></span></div><div class="ydp13d0ab58yiv7709312635" dir="ltr"><span class="ydp13d0ab58yiv7709312635"><span class="ydp13d0ab58yiv7709312635" style="font-family:old times, serif;font-size:16px;"><span class="ydp13d0ab58yiv7709312635"><span class="ydp13d0ab58yiv7709312635" style="font-family:old times, serif;font-size:16px;"><span class="ydp13d0ab58yiv7709312635"><span class="ydp13d0ab58yiv7709312635" style="font-family:old times, serif;font-size:16px;">Obrigado por qualquer ajuda!!!</span></span></span></span></span></span></div><div class="ydp13d0ab58yiv7709312635" dir="ltr"><br clear="none" class="ydp13d0ab58yiv7709312635"></div></div></div><div class="ydp13d0ab58yiv7709312635ydpb2d3ed5dsignature"><div class="ydp13d0ab58yiv7709312635" style="font-family:Helvetica, Arial, sans-serif;font-size:16px;"><div class="ydp13d0ab58yiv7709312635" style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;"><i class="ydp13d0ab58yiv7709312635" id="ydp13d0ab58yiv7709312635ydpcf278505yui_3_16_0_1_1497025264182_38508"><span class="ydp13d0ab58yiv7709312635" id="ydp13d0ab58yiv7709312635ydpcf278505yui_3_16_0_1_1497025264182_38507" style="color:rgb(0, 0, 191);font-size:12px;"><font class="ydp13d0ab58yiv7709312635" face="Courier New, courier, monaco, monospace, sans-serif" style="background-color:inherit;">Diogo Jerônimo</font></span></i></div><div class="ydp13d0ab58yiv7709312635" style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;"><i class="ydp13d0ab58yiv7709312635" id="ydp13d0ab58yiv7709312635ydpcf278505yui_3_16_0_1_1497025264182_38430"><span class="ydp13d0ab58yiv7709312635" id="ydp13d0ab58yiv7709312635ydpcf278505yui_3_16_0_1_1497025264182_38429" style="color:rgb(0, 0, 191);font-size:12px;"><font class="ydp13d0ab58yiv7709312635" 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 class="ydp13d0ab58yiv7709312635" style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;"><i class="ydp13d0ab58yiv7709312635" id="ydp13d0ab58yiv7709312635ydpcf278505yui_3_16_0_1_1497025264182_38309"><span class="ydp13d0ab58yiv7709312635" id="ydp13d0ab58yiv7709312635ydpcf278505yui_3_16_0_1_1497025264182_38308" style="color:rgb(0, 0, 191);font-size:12px;"><font class="ydp13d0ab58yiv7709312635" face="Courier New, courier, monaco, monospace, sans-serif" style="background-color:inherit;">Mestre em Metrologia - PUC-Rio/PósMQI</font></span></i></div><div class="ydp13d0ab58yiv7709312635" style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;"><i class="ydp13d0ab58yiv7709312635" id="ydp13d0ab58yiv7709312635ydpcf278505yui_3_16_0_1_1497025264182_38329"><span class="ydp13d0ab58yiv7709312635" id="ydp13d0ab58yiv7709312635ydpcf278505yui_3_16_0_1_1497025264182_38328" style="color:rgb(0, 0, 191);font-size:12px;"><font class="ydp13d0ab58yiv7709312635" id="ydp13d0ab58yiv7709312635ydpcf278505yui_3_16_0_1_1497025264182_38700" face="Courier New, courier, monaco, monospace, sans-serif" style="background-color:inherit;">CONRE: 8514 - SÉRIE A</font></span></i></div><div class="ydp13d0ab58yiv7709312635" style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;"><i class="ydp13d0ab58yiv7709312635" id="ydp13d0ab58yiv7709312635ydpcf278505yui_3_16_0_1_1497025264182_38323"><span class="ydp13d0ab58yiv7709312635" id="ydp13d0ab58yiv7709312635ydpcf278505yui_3_16_0_1_1497025264182_38322" style="line-height:17.12px;color:rgb(0, 0, 191);font-size:12px;"><font class="ydp13d0ab58yiv7709312635" id="ydp13d0ab58yiv7709312635ydpcf278505yui_3_16_0_1_1497025264182_38695" face="Courier New, courier, monaco, monospace, sans-serif" style="background-color:inherit;"><a shape="rect" class="ydp13d0ab58yiv7709312635" href="http://lattes.cnpq.br/8996149312896520" rel="nofollow" target="_blank">http://lattes.cnpq.br/8996149312896520</a></font></span></i><br clear="none" class="ydp13d0ab58yiv7709312635"></div></div></div></div></div>_______________________________________________<br clear="none" class="ydp13d0ab58yiv7709312635">R-br mailing list<br clear="none" class="ydp13d0ab58yiv7709312635"><a shape="rect" class="ydp13d0ab58yiv7709312635" href="mailto:R-br@listas.c3sl.ufpr.br" rel="nofollow" target="_blank">R-br@listas.c3sl.ufpr.br</a><br clear="none" class="ydp13d0ab58yiv7709312635">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br<br clear="none" class="ydp13d0ab58yiv7709312635">Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código mínimo reproduzível.<br clear="none" class="ydp13d0ab58yiv7709312635"></div></div></blockquote></div><br clear="none" class="ydp13d0ab58yiv7709312635"></div></div></div></div>
            </div>
        </div></body></html>