FreesearchR/README.md

116 lines
6.6 KiB
Markdown
Raw Permalink Normal View History

2026-03-23 14:10:06 +01:00
# FreesearchR <a href="https://agdamsbo.github.io/FreesearchR/"><img src="man/figures/logo.png" alt="FreesearchR website" align="right" height="70"/></a>
2024-11-08 15:13:33 +01:00
<!-- badges: start -->
2026-03-23 14:10:06 +01:00
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14527429.svg)](https://doi.org/10.5281/zenodo.14527429) [![rhub](https://github.com/agdamsbo/FreesearchR/actions/workflows/rhub.yaml/badge.svg)](https://github.com/agdamsbo/FreesearchR/actions/workflows/rhub.yaml) [![FreesearchR](https://img.shields.io/badge/Shiny-shinyapps.io-blue?style=flat&labelColor=white&logo=RStudio&logoColor=blue)](https://agdamsbo.shinyapps.io/FreesearchR/)
2024-11-08 15:13:33 +01:00
<!-- badges: end -->
2025-05-10 11:31:11 +02:00
The [***FreesearchR***](https://app.freesearchr.org) is a simple, clinical health data exploration and analysis tool to democratise clinical research by assisting any researcher to easily evaluate and analyse data and export publication ready results.
2024-11-08 15:13:33 +01:00
2025-05-10 11:37:03 +02:00
[***FreesearchR***](https://app.freesearchr.org) is free and open-source, and is [accessible in your web browser through this link](https://app.freesearchr.org). The app can also run locally, please [see below](#run-locally-on-your-own-machine-sec-run-locally).
2025-04-28 08:31:23 +02:00
All feedback is welcome and can be shared as a GitHub issue. Any suggestions on collaboration is much welcomed. Please reach out!
2024-11-08 15:13:33 +01:00
2025-05-07 09:55:03 +02:00
![FreesearchR demo](./man/figures/demo.gif)
2025-05-06 14:37:36 +02:00
2025-04-14 12:13:38 +02:00
## Motivation
2025-04-15 08:55:35 +02:00
This app has the following simple goals:
2026-03-23 14:10:06 +01:00
1. help the health clinician getting an overview of data in quality improvement projects and clinical research
2025-04-14 12:13:38 +02:00
2026-03-23 14:10:06 +01:00
2. help learners get a good start analysing data and coding in *R*
2025-04-14 12:13:38 +02:00
2026-03-23 14:10:06 +01:00
3. ease quick data overview and basic visualisations for any clinical researcher
2026-03-12 11:08:14 +01:00
Heres a polished and restructured version of your README section for clarity, conciseness, and user-friendliness:
2026-03-12 11:08:14 +01:00
## Run Locally on Your Own Machine
2025-06-26 12:33:25 +02:00
2026-03-12 11:08:14 +01:00
The **FreesearchR** app can be run locally on your machine, ensuring no data is transmitted externally. Below are the available options for setup and configuration.
2025-06-26 12:33:25 +02:00
2026-03-12 11:08:14 +01:00
### Configuration & Data Loading
2025-06-26 12:33:25 +02:00
2026-03-12 11:08:14 +01:00
The app can be configured either by passing a named list to `run_app()` or by setting environment variables in a **Docker Compose** file. The following variables control data access and display behavior. If no values are provided, the app will use the defaults listed below.
2026-03-12 11:08:14 +01:00
**Configuration Variables**
2025-04-30 10:16:45 +02:00
2026-03-23 14:10:06 +01:00
| Variable | Description | Default |
|--------------|--------------------------------------------|--------------|
| `INCLUDE_GLOBALENV` | Load datasets already present in the global R environment into the app | `FALSE` |
| `DATA_LIMIT_DEFAULT` | Default number of observations for previewing or working with a dataset | `10,000` |
| `DATA_LIMIT_UPPER` | Maximum number of observations a user can set for the upper limit. If set to 0, no uppper limit is applied. | `100,000` |
| `DATA_LIMIT_LOWER` | Minimum number of observations a user can set for the lower limit | `1` |
| `CHECK_APP_VERSION` | Always print version check results. Checks app version against latest release on GitHub. | `FALSE` |
2026-03-12 11:08:14 +01:00
### Run from R (or RStudio)
2025-06-26 12:33:25 +02:00
2026-03-12 11:08:14 +01:00
If you're working with data in R, **FreesearchR** is a quick and easy tool for exploratory analysis.
2025-06-26 12:33:25 +02:00
2026-03-23 14:10:06 +01:00
1. **Requirement:** Ensure you have [R](https://www.r-project.org/) installed, and optionally an editor like [RStudio](https://posit.co/download/rstudio-desktop/).
2025-06-26 12:33:25 +02:00
2026-03-23 14:10:06 +01:00
2. Open the **R console** and run the following code to install the `{FreesearchR}` package and launch the app:
2026-03-12 11:08:14 +01:00
2026-03-23 14:10:06 +01:00
``` r
if (!require("devtools")) install.packages("devtools")
devtools::install_github("agdamsbo/FreesearchR")
library(FreesearchR)
# Load sample data (e.g., mtcars) to make it available in the app
data(mtcars)
launch_FreesearchR(INCLUDE_GLOBALENV=TRUE,CHECK_APP_VERSION=TRUE)
```
2026-03-12 11:08:14 +01:00
2026-03-12 12:46:31 +01:00
All the variables specified above can also be passed to the app on launch from R. Set DATA_LIMIT_UPPER=0 to remove upper data limit. This limit is set to protect the online app version from choking and crashing on large data sets.
2026-03-12 11:08:14 +01:00
### Running with Docker Compose
For advanced users, you can deploy **FreesearchR** using Docker. A data folder can be mounted to `/app/data` to automatically load supported file types (`.csv`, `.tsv`, `.txt`, `.xls`, `.xlsx`, `.ods`, `.dta`, `.rds`) at startup.
To mount a local data folder, add a `volumes` entry to your `docker-compose.yml` file:
2026-03-23 14:10:06 +01:00
``` yaml
2025-06-26 12:33:25 +02:00
services:
2026-03-12 11:08:14 +01:00
shiny:
image: ghcr.io/agdamsbo/freesearchr:latest
volumes:
- ./data:/app/data:ro
environment:
- INCLUDE_GLOBALENV=FALSE
- DATA_LIMIT_DEFAULT=10000
- DATA_LIMIT_UPPER=100000
- DATA_LIMIT_LOWER=1
ports:
2025-06-26 12:33:25 +02:00
- '3838:3838'
restart: on-failure
```
2026-03-23 14:10:06 +01:00
- The `:ro` flag mounts the folder as **read-only**, preventing the app from modifying your original data files.
2026-03-12 11:08:14 +01:00
2026-03-23 14:10:06 +01:00
- If no volume is mounted, the app will start without any preloaded datasets.
2026-03-12 11:08:14 +01:00
## Code of Conduct
2025-04-30 10:16:45 +02:00
Please note that the ***FreesearchR*** project is published with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
2025-04-22 13:57:59 +02:00
2025-10-27 10:28:22 +01:00
## Translators
Thank you very much to all translators having helped to translate and validate translation drafts.
2025-04-22 13:57:59 +02:00
## Acknowledgements
Like any other project, this project was never possible without the great work of others. These are some of the sources and packages I have used:
- The ***FreesearchR*** app is built with [Shiny](https://shiny.posit.co/) and based on [*R*](https://www.r-project.org/).
2025-04-22 13:57:59 +02:00
- [gtsummary](https://www.danieldsjoberg.com/gtsummary/): superb and flexible way to create publication-ready analytical and summary tables.
- [dreamRs](https://github.com/dreamRs): maintainers of a broad selection of great extensions and tools for [Shiny](https://shiny.posit.co/).
2025-04-23 14:23:34 +02:00
2025-04-23 15:04:40 +02:00
- [easystats](https://easystats.github.io/easystats/): the [`performance::check_model()`](https://easystats.github.io/performance/articles/check_model.html) function was central in sparking the idea to create a data analysis tool.
2025-04-29 12:11:38 +02:00
- [IDEAfilter](https://biogen-inc.github.io/IDEAFilter/): a visually appealing data filter function based on the [{shinyDataFilter}](https://github.com/dgkf/shinyDataFilter).
2025-04-23 14:23:34 +02:00
This project was all written by a human and not by any AI-based tools.
2025-04-30 13:03:20 +02:00
The online ***FreesearchR*** app contains a tracking script, transmitting minimal data on usage. No uploaded data is transmitted anywhere. Have a look at the [tracking data here](https://analytics.gdamsbo.dk/share/2i4BNpMcDMB9lJvF/agdamsbo.shinyapps.io). No tracking data is sent running the app locally (see above).