it works!

This commit is contained in:
Andreas Gammelgaard Damsbo 2024-11-08 16:47:41 +01:00
parent 4c0a19f09f
commit 269658ef17
No known key found for this signature in database
4 changed files with 19 additions and 13 deletions

View file

@ -5,6 +5,6 @@ account: agdamsbo
server: shinyapps.io server: shinyapps.io
hostUrl: https://api.shinyapps.io/v1 hostUrl: https://api.shinyapps.io/v1
appId: 13276335 appId: 13276335
bundleId: 9334579 bundleId: 9334619
url: https://agdamsbo.shinyapps.io/webResearch/ url: https://agdamsbo.shinyapps.io/webResearch/
version: 1 version: 1

View file

@ -1,7 +1,7 @@
# project.aid::merge_scripts(list.files("R/",full.names = TRUE),dest = here::here("app/functions.R")) # project.aid::merge_scripts(list.files("R/",full.names = TRUE),dest = here::here("app/functions.R"))
# source(here::here("functions.R")) # source(here::here("functions.R"))
source("https://raw.githubusercongittent.com/agdamsbo/webResearch/refs/heads/main/app/functions.R") source("https://raw.githubusercontent.com/agdamsbo/webResearch/refs/heads/main/app/functions.R")
library(readr) library(readr)
library(MASS) library(MASS)
@ -17,6 +17,8 @@ library(assertthat)
library(dplyr) library(dplyr)
library(quarto) library(quarto)
library(here) library(here)
library(broom)
library(broom.helpers)
server <- function(input, output, session) { server <- function(input, output, session) {
@ -126,7 +128,9 @@ server <- function(input, output, session) {
output$report <- downloadHandler( output$report <- downloadHandler(
filename = "analyses.html", filename = "analyses.html",
content = function(file) { content = function(file) {
v$list |> write_quarto(file = file,qmd.file = "www/analyses.qmd") v$list |>
write_quarto(file = file,
qmd.file = "www/analyses.qmd")
} }
) )

View file

@ -104,16 +104,16 @@ ui <- bslib::page_sidebar(
), ),
actionButton("load", "Analyse", class = "btn-primary") actionButton("load", "Analyse", class = "btn-primary")
) )
, # ,
#
# Horizontal line ---- # # Horizontal line ----
tags$hr(), # tags$hr(),
h4("Download results"), # h4("Download results"),
#
# Button # # Button
downloadButton(outputId="report", # downloadButton(outputId="report",
label= "Download", # label= "Download",
icon = shiny::icon("download")) # icon = shiny::icon("download"))
), ),
layout_columns( layout_columns(
cards[[1]] cards[[1]]

View file

@ -13,3 +13,5 @@ project.aid::deploy_shiny(
name.token = "rsconnect_agdamsbo_token", name.token = "rsconnect_agdamsbo_token",
name.secret = "rsconnect_agdamsbo_secret" name.secret = "rsconnect_agdamsbo_secret"
) )