mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 12:37:30 +02:00
moving towards first working state
This commit is contained in:
parent
05b37b76b3
commit
4c0a19f09f
14 changed files with 75 additions and 1695 deletions
|
|
@ -5,6 +5,6 @@ account: agdamsbo
|
|||
server: shinyapps.io
|
||||
hostUrl: https://api.shinyapps.io/v1
|
||||
appId: 13276335
|
||||
bundleId: 9334284
|
||||
bundleId: 9334579
|
||||
url: https://agdamsbo.shinyapps.io/webResearch/
|
||||
version: 1
|
||||
|
|
|
|||
22
app/server.R
22
app/server.R
|
|
@ -1,5 +1,23 @@
|
|||
# project.aid::merge_scripts(list.files("R/",full.names = TRUE),dest = here::here("app/functions.R"))
|
||||
source(here::here("app/functions.R"))
|
||||
# source(here::here("functions.R"))
|
||||
|
||||
source("https://raw.githubusercongittent.com/agdamsbo/webResearch/refs/heads/main/app/functions.R")
|
||||
|
||||
library(readr)
|
||||
library(MASS)
|
||||
library(stats)
|
||||
library(gt)
|
||||
library(gtsummary)
|
||||
library(openxlsx2)
|
||||
library(haven)
|
||||
library(readODS)
|
||||
library(shiny)
|
||||
library(bslib)
|
||||
library(assertthat)
|
||||
library(dplyr)
|
||||
library(quarto)
|
||||
library(here)
|
||||
|
||||
|
||||
server <- function(input, output, session) {
|
||||
v <- shiny::reactiveValues(
|
||||
|
|
@ -108,7 +126,7 @@ server <- function(input, output, session) {
|
|||
output$report <- downloadHandler(
|
||||
filename = "analyses.html",
|
||||
content = function(file) {
|
||||
v$list |> write_quarto(file = file)
|
||||
v$list |> write_quarto(file = file,qmd.file = "www/analyses.qmd")
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
|||
18
app/ui.R
18
app/ui.R
|
|
@ -104,16 +104,16 @@ ui <- bslib::page_sidebar(
|
|||
),
|
||||
actionButton("load", "Analyse", class = "btn-primary")
|
||||
)
|
||||
# ,
|
||||
,
|
||||
|
||||
# Horizontal line ----
|
||||
# tags$hr(),
|
||||
# h4("Download results"),
|
||||
#
|
||||
# # Button
|
||||
# downloadButton(outputId="report",
|
||||
# label= "Download",
|
||||
# icon = shiny::icon("download"))
|
||||
# Horizontal line ----
|
||||
tags$hr(),
|
||||
h4("Download results"),
|
||||
|
||||
# Button
|
||||
downloadButton(outputId="report",
|
||||
label= "Download",
|
||||
icon = shiny::icon("download"))
|
||||
),
|
||||
layout_columns(
|
||||
cards[[1]]
|
||||
|
|
|
|||
39
app/www/analyses.qmd
Normal file
39
app/www/analyses.qmd
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
title: "webResearch analysis results"
|
||||
date: today
|
||||
execute:
|
||||
echo: false
|
||||
params:
|
||||
data.file: NA
|
||||
---
|
||||
|
||||
```{r setup}
|
||||
web_data <- readRDS(file = params$data.file)
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
|
||||
|
||||
## Methods
|
||||
|
||||
|
||||
Analyses were conducted in R version `r paste(version["major"],version["minor"],sep=".")` using the web-based data analysis tool 'webResearcher' version `r packageVersion("webResearch")`.
|
||||
|
||||
## Results
|
||||
|
||||
Below is the baseline characteristics plotted.
|
||||
|
||||
```{r}
|
||||
web_data$table1
|
||||
```
|
||||
|
||||
Here are the regression results.
|
||||
|
||||
```{r}
|
||||
web_data$table2
|
||||
```
|
||||
|
||||
## Discussion
|
||||
|
||||
Good luck on your further work!
|
||||
Loading…
Add table
Add a link
Reference in a new issue