<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="">Bom dia<div class=""><br class=""></div><div class="">Não sei se é o modo mais eficaz, mas acho que isso resolve seu problema</div><div class=""><br class=""></div><div class=""><div class="">trat <- unique(Entrada$Tratamento)</div><div class="">df <- data.frame(Tratamento=character(), Localiza=character())</div><div class="">for (i in trat) {</div><div class=""> tmp <- as.data.frame(Entrada[Entrada$Tratamento == i,])</div><div class=""> ens = unique(tmp$Ensaio)</div><div class=""> loc = ''</div><div class=""> n = 0</div><div class=""> for (e in ens) {</div><div class=""> tmp_e <- as.data.frame(tmp[tmp$Ensaio == e, ])</div><div class=""> print(tmp_e)</div><div class=""> s <- paste('Ensaio ', e)</div><div class=""> ps <- paste(tmp_e$Parcela, collapse = ', ')</div><div class=""> ps <- paste('Parcela ', ps)</div><div class=""> psf <- paste(s, ps, sep = ' ')</div><div class=""> if (n > 0) {</div><div class=""> psf <- paste('; ', psf)</div><div class=""> }</div><div class=""> loc <- paste(loc, psf, sep = '')</div><div class=""> n = n+1</div><div class=""> }</div><div class=""> tmp_df <- data.frame(Tratamento = tmp_e[1,4], Localiza=loc)</div><div class=""> df <- rbind(df, tmp_df)</div><div class="">}</div><div class="">df</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">Daniel Tiezzi, MD, PhD<br class="">Oncologia / Mastologia</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">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 style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On 24 Mar 2020, at 11:02, Vander Souza 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=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Saida = data.frame(</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""> Tratamento = c("T1", "T2"),</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""> Localiza = c("Ensaio 1 Parcela 2, 44, 88; Ensaio 2 Parcela 111, 167, 205",</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""> "Ensaio 1 Parcela 4, 66, 100; Ensaio 2 Parcela 122, 177, 195")</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">)</span></div></blockquote></div><br class=""></div></body></html>