Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-or committed Feb 20, 2024
1 parent 302b266 commit 7e06189
Show file tree
Hide file tree
Showing 6 changed files with 1,242 additions and 97 deletions.
Binary file modified R/sysdata.rda
Binary file not shown.
8 changes: 8 additions & 0 deletions R/update_base_readme.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,20 @@ update_base_readme <- function(){
rvest::html_text2() |>
stringr::str_trim()

if (is.na(titulo)) {
titulo <- evento
}

fonte <- resposta_n |>
rvest::html_elements(xpath = '//div[contains(text(), "Fonte:")]') |>
rvest::html_text2() |>
stringr::str_replace_all(pattern = "\\r\\n\\r \\r\\t\\r\\r Veja a vers\\u00e3o do Tab para Windows \\\\(TABWIN\\\\)", "") |>
stringr::str_trim()

if (is.na(fonte) || length(fonte) == 0) {
fonte <- "Fonte: Ministério da Saúde/Secretaria Estadual de Saúde - RJ"
}

tabela_ <- data.frame(
evento = evento,
titulo = titulo,
Expand Down
6 changes: 3 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ see_normality(rnorm(100, mean = 0, sd = 1), "Example")

```{r eval=TRUE, message=FALSE, warning=FALSE, include=TRUE, echo=FALSE}
main_data <- readRDS("R/sysdata.rda")
load("inst/base_readme.rda")
main_data |>
knitr::kable()
tab_base_readme |>
knitr::kable(col.names = c("Evento","Descrição","Observações"))
```

Expand Down
Loading

0 comments on commit 7e06189

Please sign in to comment.