This commit is contained in:
Andreas Gammelgaard Damsbo 2025-04-22 09:58:18 +02:00
commit 07e94f4401
No known key found for this signature in database
3 changed files with 87 additions and 31 deletions

View file

@ -61,6 +61,16 @@ This will unfold options to preview your data dictionary (the main database meta
When opening the online hosted app, this is mainly for testing purposes. When running the app locally from *R* on your own computer, you will find all data.frames in the current environment here. This extends the possible uses of this app to allow for quick and easy data insights and code generation for basic plotting to fine tune.
## Data
This is the panel to get a good overview of your data, check data is classed and formatted correctly, perform simple modifications and filter data.
### Summary
### Modify
## Evaluate
This panel allows for basic data evaluation.
@ -80,7 +90,7 @@ There are a number of plotting options to visualise different aspects of the dat
Below are the available plot types listed.
```{r echo = FALSE, eval = TRUE}
c("continuous", "dichotomous", "ordinal", "categorical") |>
c("continuous", "dichotomous", "categorical") |>
lapply(\(.x){
dplyr::bind_cols(
dplyr::tibble("Data type"=.x),
@ -106,6 +116,27 @@ Also copy the code to generate the plot in your own R-environment and fine tune
This section is only intended for very simple explorative analyses and as a proof-of-concept for now. If you are doing complex regression analyses you should probably just write the code yourself.
Below are the available regression types listed.
```{r echo = FALSE, eval = TRUE}
c("continuous", "dichotomous", "categorical") |>
lapply(\(.x){
dplyr::bind_cols(
dplyr::tibble("Data type"=.x),
supported_functions()|>
lapply(\(.y){
if (.x %in% .y$out.type){
.y[c("descr","fun","design")]|> dplyr::bind_cols()
}
})|>
dplyr::bind_rows() |>
setNames(c("Regression model","Function","Study design")))
}) |>
dplyr::bind_rows() |>
# toastui::datagrid(filters=TRUE,theme="striped") |>
kableExtra::kable()
```
### Table
Generate simple regression models and get the results in a nice table. This will also be included in the exported report.

33
vignettes/data-types.Rmd Normal file
View file

@ -0,0 +1,33 @@
---
title: "Data types"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{data-types}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
```{r setup}
library(FreesearchR)
```
## A clinical data class
Traditionally in *R*, data is identified by classes, like numeric, integer, double, logical, factor etc. These classes can be a little confusing from a clinical or operational standpoint. In the ***FreesearchR*** app, these classes has been simplified and modified to the following data types, that are assigned on a prioritised order like the following:
```{r echo = FALSE, eval = TRUE}
data_types() |> purrr::imap(\(.x,.i){
dplyr::bind_cols("type"=.i,.x,.name_repair = "unique_quiet")
}) |> dplyr::bind_rows() |>
setNames(c("Data type","Description","Data classes included")) |>
kableExtra::kable()
```
Categorising data in this way makes sense when making choices on how to evaluate and analyse data. This is used throughout the ***FreesearchR*** app to simplify data handling.