2024-02-26 21:05:02 +01:00
---
2024-02-27 12:42:58 +01:00
title: "Shiny-app"
2024-02-26 21:05:02 +01:00
output: rmarkdown::html_vignette
vignette: >
2024-02-27 12:42:58 +01:00
%\VignetteIndexEntry{Shiny-app}
2024-02-26 21:05:02 +01:00
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
2024-11-18 14:41:44 +01:00
To make the easiest possible transition from spreadsheet/dataset to REDCap, I have created a small app, which adds a graphical interface to the casting of a data dictionary and data upload. Install the package and launch the app as follows:
2024-02-26 21:05:02 +01:00
2024-02-27 12:42:58 +01:00
```{r eval=FALSE}
2024-11-18 14:41:44 +01:00
REDCapCAST::shiny_cast()
```
The app primarily wraps one function: `ds2dd_detailed()`.
```{r}
REDCap_split(
records = redcapcast_data,
metadata = redcapcast_meta,
forms = "all"
) |>
sanitize_split() |>
redcap_wider() |>
ds2dd_detailed()|>
purrr::pluck("data") |>
readr::type_convert(
col_types = readr::cols(.default = readr::col_guess()))
```
```{r}
redcapcast_data |>
dplyr::mutate(dplyr::across(dplyr::everything(),as.character)) |>
readr::type_convert(
col_types = readr::cols(.default = readr::col_guess()))
2024-02-26 21:05:02 +01:00
```