mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-09-12 18:09:39 +02:00
added regression types to text
This commit is contained in:
parent
d51fd27996
commit
2554ce50a4
2 changed files with 15 additions and 3 deletions
|
@ -5,6 +5,6 @@ account: cognitiveindex
|
|||
server: shinyapps.io
|
||||
hostUrl: https://api.shinyapps.io/v1
|
||||
appId: 13786206
|
||||
bundleId: 9688503
|
||||
bundleId: 9688582
|
||||
url: https://cognitiveindex.shinyapps.io/freesearcheR_dev/
|
||||
version: 1
|
||||
|
|
|
@ -9,7 +9,7 @@ params:
|
|||
---
|
||||
|
||||
```{r setup, echo = FALSE}
|
||||
knitr::opts_chunk$set(echo = FALSE, message=FALSE, warning=FALSE)
|
||||
knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
|
||||
```
|
||||
|
||||
|
||||
|
@ -25,6 +25,18 @@ tbl_merge <- function(data) {
|
|||
data |> gtsummary::tbl_merge(tab_spanner = names(data))
|
||||
}
|
||||
}
|
||||
|
||||
vec2sentence <- function(data, sep.word = "and") {
|
||||
sep.word <- paste0(" ", gsub(" ", "", sep.word), " ")
|
||||
if (length(data) < 2) {
|
||||
out <- data
|
||||
} else if (length(data) == 2) {
|
||||
out <- paste(data, collapse = sep.word)
|
||||
} else {
|
||||
out <- paste(paste(data[-length(data)], collapse = ","), data[length(data)], sep = sep.word)
|
||||
}
|
||||
return(out)
|
||||
}
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
@ -44,7 +56,7 @@ tbl <- gtsummary::as_gt(web_data$table1)
|
|||
knitr::knit_print(tbl)
|
||||
```
|
||||
|
||||
Below are the results from the
|
||||
Below are the results from the `r tolower(vec2sentence(names(web_data$regression$tables)))` `r web_data$regression$params$descr`.
|
||||
|
||||
```{r, results = 'asis'}
|
||||
reg_tbl <- web_data$regression$tables
|
||||
|
|
Loading…
Add table
Reference in a new issue