mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 12:37:30 +02:00
bumped to 25.2.1 - new visuals tab - all functions in place - code cleanup has started
This commit is contained in:
parent
c4b5a7ba79
commit
14edce9912
36 changed files with 3564 additions and 2976 deletions
438
inst/apps/freesearcheR/www/intro.html
Normal file
438
inst/apps/freesearcheR/www/intro.html
Normal file
File diff suppressed because one or more lines are too long
29
inst/apps/freesearcheR/www/intro.md
Normal file
29
inst/apps/freesearcheR/www/intro.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# Welcome
|
||||
|
||||
This is the ***freesearcheR*** data analysis tool. We intend the ***freesearcheR*** to be a powerful and free tool for easy data evaluation and analysis at the hands of the clinician. If you need more advanced tools for regression models or plotting, you'll probably be better off using *R* or similar directly on your own machine.
|
||||
|
||||
By intention, this tool has been designed to be simple to use with a minimum of mandatory options to keep the workflow streamlined, while also including a few options to go even further.
|
||||
|
||||
There are some simple steps to go through (see corresponding tabs in the top):
|
||||
|
||||
1. Import data (a spreadsheet/file on your machine, direct export from a REDCap server, or a local file provided with a package) to get started.
|
||||
|
||||
1. Data inspection and modification (change variable classes, create new variables (categorical from numeric or time data, or completely new variables from the data)
|
||||
|
||||
1. Evaluate data using descriptive analyses methods and inspect cross-correlations
|
||||
|
||||
1. Create simple, clean plots for data overview.
|
||||
|
||||
1. Create regression models for even more advanced data analyses
|
||||
|
||||
- Linear, dichotomous or ordinal logistic regression will be used depending on specified outcome variable
|
||||
|
||||
- Plot regression analysis coefficients
|
||||
|
||||
- Evaluation of model assumptions
|
||||
|
||||
1. Export the the analyses results for MS Word or [LibreOffice](https://www.libreoffice.org/) as well as the data with preserved metadata.
|
||||
|
||||
Have a look at the [documentations page](https://agdamsbo.github.io/freesearcheR/) for further project description. If you're interested in the source code, then go on, [have a look](https://github.com/agdamsbo/freesearcheR)!
|
||||
|
||||
If you encounter anything strange or the app doesn't act as expected. Please [report on Github](https://github.com/agdamsbo/freesearcheR/issues).
|
||||
413
inst/apps/freesearcheR/www/notes_visuals.html
Normal file
413
inst/apps/freesearcheR/www/notes_visuals.html
Normal file
File diff suppressed because one or more lines are too long
11
inst/apps/freesearcheR/www/notes_visuals.md
Normal file
11
inst/apps/freesearcheR/www/notes_visuals.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# Basic visualisations
|
||||
|
||||
This section on plotting data is kept very minimal, and includes only the most common plot types for clinical projects.
|
||||
|
||||
If you want to go further, have a look at these sites with suggestions and sample code for data plotting:
|
||||
|
||||
- [*R* Charts](https://r-charts.com/): Extensive gallery with great plots
|
||||
|
||||
- [*R* Graph gallery](https://r-graph-gallery.com/): Another gallery with great graphs
|
||||
|
||||
- [grphics principles](https://graphicsprinciples.github.io/): Easy to follow recommendations for clear visuals.
|
||||
72
inst/apps/freesearcheR/www/report.rmd
Normal file
72
inst/apps/freesearcheR/www/report.rmd
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
---
|
||||
title: "freesearcheR data report"
|
||||
date: "Report generated `r gsub('(\\D)0', '\\1', format(Sys.time(), '%A, %d.%m.%Y'))`"
|
||||
format: docx
|
||||
author: freesearcheR data analysis tool
|
||||
toc: false
|
||||
params:
|
||||
data.file: NA
|
||||
---
|
||||
|
||||
```{r setup, echo = FALSE}
|
||||
knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
|
||||
# glue::glue("{format(lubridate::today(),'%A')}, {lubridate::day(lubridate::today())}.{lubridate::month(lubridate::today())}.{lubridate::year(lubridate::today())}")
|
||||
```
|
||||
|
||||
|
||||
```{r}
|
||||
web_data <- readr::read_rds(file = params$data.file)
|
||||
library(gtsummary)
|
||||
library(gt)
|
||||
|
||||
tbl_merge <- function(data) {
|
||||
if (is.null(names(data))) {
|
||||
data |> gtsummary::tbl_merge()
|
||||
} else {
|
||||
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
|
||||
|
||||
Research should be free and open with easy access for all. The freesearcheR tool attempts to help lower the bar to participate in contributing to science by making guided data analysis easily accessible in the web-browser.
|
||||
|
||||
## Methods
|
||||
|
||||
Analyses were conducted in the *freesearcheR* data analysis web-tool based on R version 4.4.1.
|
||||
|
||||
## Results
|
||||
|
||||
Below are the baseline characteristics.
|
||||
|
||||
```{r, results = 'asis'}
|
||||
if ("table1" %in% names(web_data)){
|
||||
tbl <- gtsummary::as_gt(web_data$table1)
|
||||
knitr::knit_print(tbl)}
|
||||
```
|
||||
|
||||
`r if ("regression" %in% names(web_data)) glue::glue("Below are the results from the { tolower(vec2sentence(names(web_data$regression$tables)))} {web_data$regression$params$descr}.")`
|
||||
|
||||
```{r, results = 'asis'}
|
||||
if ("regression" %in% names(web_data)){
|
||||
reg_tbl <- web_data$regression$tables
|
||||
knitr::knit_print(tbl_merge(reg_tbl))
|
||||
}
|
||||
```
|
||||
|
||||
## Discussion
|
||||
|
||||
Good luck on your further work!
|
||||
1
inst/apps/freesearcheR/www/umami-app.html
Normal file
1
inst/apps/freesearcheR/www/umami-app.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<script defer src="https://analytics.gdamsbo.dk/script.js" data-website-id="e7d4e13a-5824-4778-bbc0-8f92fb08303a"></script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue