<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<p>Obrigado Cid, problema perfeitamente resolvido!!!</p>
<pre tabindex="0" aria-label="Console Output" role="document" class="GGBOEFPDAWB" id="rstudio_console_output" style="font-family: "Lucida Console", monospace; font-size: 13.3333px; outline: none; border: none; word-break: break-all; margin: 0px; user-select: text; white-space: pre-wrap !important; line-height: 1.2; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: -webkit-left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><span tabindex="-1" role="document"><span class="GGBOEFPDAWB" style="outline: none; border: none; word-break: break-all; margin: 0px; user-select: text; white-space: pre-wrap !important;">head(mydf2)</span></span></pre>
<pre tabindex="0" aria-label="Console Output" role="document" class="GGBOEFPDAWB" id="rstudio_console_output" style="font-family: "Lucida Console", monospace; font-size: 13.3333px; outline: none; border: none; word-break: break-all; margin: 0px; user-select: text; white-space: pre-wrap !important; line-height: 1.2; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: -webkit-left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><span tabindex="-1" role="document"><span class="GGBOEFPDAWB" style="outline: none; border: none; word-break: break-all; margin: 0px; user-select: text; white-space: pre-wrap !important;"> interation avg_loss mAP
1 1001 0.523133 58.6
2 1003 0.496871 58.6
3 1005 0.523653 58.6
4 1007 0.535484 58.6
5 1009 0.530135 58.6
6 1011 0.524369 58.6
tail(mydf2)
interation avg_loss mAP
1495 3989 0.371550 79.49
1496 3991 0.358697 79.49
1497 3993 0.352938 79.49
1498 3995 0.352469 79.49
1499 3997 0.359153 79.49
1500 3999 0.343659 79.49
</span></span></pre>
<pre class="moz-signature" cols="72">--
Alexandre dos Santos
Geotechnologies and Spatial Statistics applied to Forest Entomology
Instituto Federal de Mato Grosso (IFMT) - Campus Caceres
Caixa Postal 244 (PO Box)
Avenida dos Ramires, s/n - Vila Real
Caceres - MT - CEP 78201-380 (ZIP code)
Phone: (+55) 65 99686-6970 / (+55) 65 3221-2674
Lattes CV: <a class="moz-txt-link-freetext" href="http://lattes.cnpq.br/1360403201088680">http://lattes.cnpq.br/1360403201088680</a>
OrcID: orcid.org/0000-0001-8232-6722
ResearchGate: <a class="moz-txt-link-abbreviated" href="http://www.researchgate.net/profile/Alexandre_Santos10">www.researchgate.net/profile/Alexandre_Santos10</a>
Publons: <a class="moz-txt-link-freetext" href="https://publons.com/researcher/3085587/alexandre-dos-santos/">https://publons.com/researcher/3085587/alexandre-dos-santos/</a>
--</pre>
<div class="moz-cite-prefix">Em 28/09/2020 17:45, ASANTOS escreveu:<br>
</div>
<blockquote type="cite"
cite="mid:0b26b631-29ed-f305-dfb6-f9b40803eb20@cas.ifmt.edu.br">
<br>
Estou com um problema para criar um dataframe a partir de um
conjunto de duas linhas de interesse, sendo:
<br>
<br>
library(tidyverse)
<br>
myfile<-read_lines(<a class="moz-txt-link-rfc2396E" href="https://raw.githubusercontent.com/Leprechault/yolov3ants/master/yolov3-lca_416_conv81_sub_8_log.txt">"https://raw.githubusercontent.com/Leprechault/yolov3ants/master/yolov3-lca_416_conv81_sub_8_log.txt"</a>)
<br>
head(myfile)
<br>
<br>
Em algumas parte do meu arquivo eu tenho trechos que quero extrair
que são:
<br>
<br>
#Last accuracy <a class="moz-txt-link-abbreviated" href="mailto:mAP@0.5">mAP@0.5</a> = 73.10 %
<br>
#1585: 0.299288, 0.423193 avg loss, 0.001000 rate, 3.927486
seconds, 101440 images
<br>
<br>
Nesses pontos eu quero remover as informações: <a class="moz-txt-link-abbreviated" href="mailto:mAP@0.5">mAP@0.5</a> = 73.10 %
(na primeira linha), 1585: e 0.423193 avg loss (da linha seguinte)
e criar um dataframe final que seria:
<br>
<br>
# iteration avg_loss mAP
<br>
# 1585 0.423193 73.10
<br>
<br>
mas quando tento remover a informação de interesse e por ser
beginner no tidyverse, não tenho sucesso, sendo a minha tentativa
no sentido de:
<br>
<br>
names_col2 <- c("iteration", "avg_loss", "mAP")
<br>
<br>
mydf <- myfile %>%
<br>
str_subset("Last accuracy <a class="moz-txt-link-abbreviated" href="mailto:mAP@0.5">mAP@0.5</a> =") %>%
<br>
enframe(name = NULL) %>%
<br>
separate(col = value, into = names_col2, sep = "[=,]") %>%
<br>
mutate_all(parse_number)
<br>
head(as.data.frame(mydf))
<br>
<br>
<br>
Alguém poderia me dar uma luz?
<br>
<br>
Obrigado e abraços,
<br>
<br>
Alexandre
<br>
<br>
</blockquote>
</body>
</html>