# test report template-----------------
output$test_report <- downloadHandler(
#https://shiny.rstudio.com/gallery/download-knitr-reports.html
filename = function(){
paste('Leistungstest_xy_',
Sys.Date(),
switch(
input$report_format_type,
pdf = ".pdf",
word = ".docx"
),
sep = "")
},
content = function(file) {
params <- list(ostit = ostit,
report_format_type = input$report_format_type
)
rmarkdown::render(
file.path("report_templates", "report_leistungstest.Rmd"),
params = params,
envir = new.env(parent = globalenv()),
output_file = file,
output_format =
switch(
input$report_format_type ,
pdf = pdf_document(),
word = word_document()
),
encoding = "UTF-8"
)
}
)
# design-aid template -----------------
output$entwicklungs_report <- downloadHandler(
filename = function(){
paste('Empfehlung_Stichprobengroesse_',
Sys.Date(),
switch(
input$report_format_type,
pdf = ".pdf",
word = ".docx"
),
sep = "")
},
content = function(file) {
params <- list(ostit = ostit,
bootstrap_data = bootstrap_data(),
plot_scales_desgin_aid = plot_scales_desgin_aid(),
plot_scales_messwerte = plot_scales_messwerte(),
report_format_type = input$report_format_type
)
rmarkdown::render(
file.path("report_templates", "report_sample_size_hint.Rmd"),
params = params,
envir = new.env(parent = globalenv()),
output_file = file,
output_format =
switch(
input$report_format_type ,
pdf = pdf_document(),
word = word_document()
),
encoding = "UTF-8"
)
}
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.