<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Boa noite Jeronimo<div class=""><br class=""></div><div class="">Acredito que você pode criar uma matrix e subtrair a matrix transversa do vetor.</div><div class=""><br class=""></div><div class=""><div class="">a <- c(19,23,27,29)</div><div class="">m <- matrix(rep(a, length(a)), length(a))</div><div class="">rm <- t(a - t(m))</div><div class=""><br class=""></div><div class=""> A parte triangular da matrix resultante tem os seus valores. Pode usar a função lower.tri() pra extrair seus valores </div><div class=""><br class=""></div><div class="">abs(rm[lower.tri(rm, diag = FALSE)])</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Veja se funciona</div><div class=""><br class=""></div><div class="">Daniel</div><div class=""><br class=""></div><div class=""><div style="orphans: 2; widows: 2;" class="">----------------------------------------------------------------<br class=""><div class=""><div>Daniel Tiezzi, MD, PhD</div><div>Oncologia / Mastologia<br class="">Professor Associado - Livre Docente<br class="">Departamento de Ginecologia e Obstetrícia<br class="">Setor de Mastologia e Oncologia Ginecológica<br class="">Faculdade de Medicina de Ribeirão Preto - USP<br class="">Tel.: 16 3602-2488<br class=""><a href="mailto:dtiezzi@usp.br" class="">e-mail: dtiezzi@usp.br</a></div></div><div class=""><br class=""></div></div></div><div><br class=""><blockquote type="cite" class=""><div class="">On 5 Aug 2020, at 14:22, Diogo Jerônimo por (R-br) <<a href="mailto:r-br@listas.c3sl.ufpr.br" class="">r-br@listas.c3sl.ufpr.br</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div class="ydpb2d3ed5dyahoo-style-wrap" style="font-family: bookman old style, new york, times, serif; font-size: 16px;"><div dir="ltr" data-setdir="false" class="">Boa tarde a todos. Seja por exemplo o seguinte vetor:</div><div dir="ltr" data-setdir="false" class=""><br class=""></div><div dir="ltr" data-setdir="false" class="">x=(19,23,27,29)</div><div dir="ltr" data-setdir="false" class=""><div class=""><div dir="ltr" data-setdir="false" class=""><br class=""></div><div dir="ltr" data-setdir="false" class="">É 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 dir="ltr" data-setdir="false" class=""><br class=""></div><div dir="ltr" data-setdir="false" class="">vetor=(|19-23|,<span class=""><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;" class="">|19-27|,</span></span><span class=""><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;" class="">|19-29|,</span></span><span class=""><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;" class="">|23-27|,<span class=""><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;" class="">|23-29|,<span class=""><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;" class="">|27-29|)</span></span></span></span></span></span></div><div dir="ltr" data-setdir="false" class=""><span class=""><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;" class=""><span class=""><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;" class=""><span class=""><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;" class=""><br class=""></span></span></span></span></span></span></div><div dir="ltr" data-setdir="false" class=""><span class=""><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;" class=""><span class=""><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;" class=""><span class=""><span style="font-family: "bookman old style", "new york", times, serif; font-size: 16px;" class="">Obrigado por qualquer ajuda!!!</span></span></span></span></span></span></div><div dir="ltr" data-setdir="false" class=""><br class=""></div></div></div><div class="ydpb2d3ed5dsignature"><div style="font-family:Helvetica, Arial, sans-serif;font-size:16px;" class=""><div style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;" class=""><i id="ydpcf278505yui_3_16_0_1_1497025264182_38508" class=""><span id="ydpcf278505yui_3_16_0_1_1497025264182_38507" style="color: rgb(0, 0, 191); font-size: 12px;" class=""><font face="Courier New, courier, monaco, monospace, sans-serif" style="background-color: inherit;" class="">Diogo Jerônimo</font></span></i></div><div style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;" class=""><i id="ydpcf278505yui_3_16_0_1_1497025264182_38430" class=""><span id="ydpcf278505yui_3_16_0_1_1497025264182_38429" style="color: rgb(0, 0, 191); font-size: 12px;" class=""><font face="Courier New, courier, monaco, monospace, sans-serif" style="background-color: inherit;" class="">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;" class=""><i id="ydpcf278505yui_3_16_0_1_1497025264182_38309" class=""><span id="ydpcf278505yui_3_16_0_1_1497025264182_38308" style="color: rgb(0, 0, 191); font-size: 12px;" class=""><font face="Courier New, courier, monaco, monospace, sans-serif" style="background-color: inherit;" class="">Mestre em Metrologia - PUC-Rio/PósMQI</font></span></i></div><div style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;" class=""><i id="ydpcf278505yui_3_16_0_1_1497025264182_38329" class=""><span id="ydpcf278505yui_3_16_0_1_1497025264182_38328" style="color: rgb(0, 0, 191); font-size: 12px;" class=""><font face="Courier New, courier, monaco, monospace, sans-serif" id="ydpcf278505yui_3_16_0_1_1497025264182_38700" style="background-color: inherit;" class="">CONRE: 8514 - SÉRIE A</font></span></i></div><div style="margin-bottom:0.0001pt;padding:0px;line-height:normal;background:white;" class=""><i id="ydpcf278505yui_3_16_0_1_1497025264182_38323" class=""><span id="ydpcf278505yui_3_16_0_1_1497025264182_38322" style="line-height: 17.12px; color: rgb(0, 0, 191); font-size: 12px;" class=""><font face="Courier New, courier, monaco, monospace, sans-serif" id="ydpcf278505yui_3_16_0_1_1497025264182_38695" style="background-color: inherit;" class=""><a href="http://lattes.cnpq.br/8996149312896520" class="">http://lattes.cnpq.br/8996149312896520</a></font></span></i><br class=""></div></div></div></div></div>_______________________________________________<br class="">R-br mailing list<br class=""><a href="mailto:R-br@listas.c3sl.ufpr.br" class="">R-br@listas.c3sl.ufpr.br</a><br class="">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br<br class="">Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código mínimo reproduzível.<br class=""></div></blockquote></div><br class=""></div></body></html>