mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-12-15 17:12:09 +01:00
Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ed74e0492c | |||
| d9614eb37f | |||
| 30f13c7232 | |||
| f4f433ee84 | |||
| 2a580965e3 |
29 changed files with 1326 additions and 125 deletions
77
CITATION.cff
77
CITATION.cff
|
|
@ -8,7 +8,7 @@ message: 'To cite package "FreesearchR" in publications use:'
|
|||
type: software
|
||||
license: AGPL-3.0-or-later
|
||||
title: 'FreesearchR: Easy data analysis for clinicians'
|
||||
version: 25.12.3
|
||||
version: 25.12.6
|
||||
doi: 10.5281/zenodo.14527429
|
||||
identifiers:
|
||||
- type: url
|
||||
|
|
@ -1128,6 +1128,81 @@ references:
|
|||
email: garnier@njit.edu
|
||||
year: '2025'
|
||||
doi: 10.32614/CRAN.package.viridis
|
||||
- type: software
|
||||
title: smd
|
||||
abstract: 'smd: Compute Standardized Mean Differences'
|
||||
notes: Imports
|
||||
url: https://bsaul.github.io/smd/
|
||||
repository: https://CRAN.R-project.org/package=smd
|
||||
authors:
|
||||
- family-names: Saul
|
||||
given-names: Bradley
|
||||
email: bradleysaul@fastmail.com
|
||||
year: '2025'
|
||||
doi: 10.32614/CRAN.package.smd
|
||||
- type: software
|
||||
title: doconv
|
||||
abstract: 'doconv: Document Conversion to ''PDF'' or ''PNG'''
|
||||
notes: Imports
|
||||
url: https://github.com/ardata-fr/doconv
|
||||
repository: https://CRAN.R-project.org/package=doconv
|
||||
authors:
|
||||
- family-names: Gohel
|
||||
given-names: David
|
||||
email: david.gohel@ardata.fr
|
||||
year: '2025'
|
||||
doi: 10.32614/CRAN.package.doconv
|
||||
- type: software
|
||||
title: locatexec
|
||||
abstract: 'locatexec: Detection and Localization of Executable Files'
|
||||
notes: Imports
|
||||
url: https://github.com/ardata-fr/locatexec
|
||||
repository: https://CRAN.R-project.org/package=locatexec
|
||||
authors:
|
||||
- family-names: Gohel
|
||||
given-names: David
|
||||
email: david.gohel@ardata.fr
|
||||
year: '2025'
|
||||
doi: 10.32614/CRAN.package.locatexec
|
||||
- type: software
|
||||
title: magick
|
||||
abstract: 'magick: Advanced Graphics and Image-Processing in R'
|
||||
notes: Imports
|
||||
url: https://docs.ropensci.org/magick/
|
||||
repository: https://CRAN.R-project.org/package=magick
|
||||
authors:
|
||||
- family-names: Ooms
|
||||
given-names: Jeroen
|
||||
email: jeroenooms@gmail.com
|
||||
orcid: https://orcid.org/0000-0002-4035-0289
|
||||
year: '2025'
|
||||
doi: 10.32614/CRAN.package.magick
|
||||
- type: software
|
||||
title: pdftools
|
||||
abstract: 'pdftools: Text Extraction, Rendering and Converting of PDF Documents'
|
||||
notes: Imports
|
||||
url: https://ropensci.r-universe.dev/pdftools
|
||||
repository: https://CRAN.R-project.org/package=pdftools
|
||||
authors:
|
||||
- family-names: Ooms
|
||||
given-names: Jeroen
|
||||
email: jeroenooms@gmail.com
|
||||
orcid: https://orcid.org/0000-0002-4035-0289
|
||||
year: '2025'
|
||||
doi: 10.32614/CRAN.package.pdftools
|
||||
- type: software
|
||||
title: qpdf
|
||||
abstract: 'qpdf: Split, Combine and Compress PDF Files'
|
||||
notes: Imports
|
||||
url: https://docs.ropensci.org/qpdf/
|
||||
repository: https://CRAN.R-project.org/package=qpdf
|
||||
authors:
|
||||
- family-names: Ooms
|
||||
given-names: Jeroen
|
||||
email: jeroenooms@gmail.com
|
||||
orcid: https://orcid.org/0000-0002-4035-0289
|
||||
year: '2025'
|
||||
doi: 10.32614/CRAN.package.qpdf
|
||||
- type: software
|
||||
title: styler
|
||||
abstract: 'styler: Non-Invasive Pretty Printing of R Code'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Package: FreesearchR
|
||||
Title: Easy data analysis for clinicians
|
||||
Version: 25.12.4
|
||||
Version: 25.12.6
|
||||
Authors@R: c(
|
||||
person("Andreas Gammelgaard", "Damsbo",email="agdamsbo@clin.au.dk", role = c("aut", "cre"),
|
||||
comment = c(ORCID = "0000-0002-7559-1154")),
|
||||
|
|
@ -70,7 +70,8 @@ Imports:
|
|||
shiny.i18n,
|
||||
stRoke,
|
||||
data.table,
|
||||
viridis
|
||||
viridis,
|
||||
smd
|
||||
Suggests:
|
||||
styler,
|
||||
devtools,
|
||||
|
|
@ -130,6 +131,7 @@ Collate:
|
|||
'report.R'
|
||||
'separate_string.R'
|
||||
'syntax_highlight.R'
|
||||
'table-download-module.R'
|
||||
'theme.R'
|
||||
'translate.R'
|
||||
'ui_elements.R'
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ export(add_class_icon)
|
|||
export(add_sparkline)
|
||||
export(align_axes)
|
||||
export(all_but)
|
||||
export(allowed_operations)
|
||||
export(append_column)
|
||||
export(append_list)
|
||||
export(argsstring2list)
|
||||
|
|
@ -88,7 +89,6 @@ export(launch_FreesearchR)
|
|||
export(limit_data_size)
|
||||
export(limit_log)
|
||||
export(line_break)
|
||||
export(list_allowed_operations)
|
||||
export(list_pkg_data)
|
||||
export(m_redcap_readServer)
|
||||
export(m_redcap_readUI)
|
||||
|
|
|
|||
12
NEWS.md
12
NEWS.md
|
|
@ -1,3 +1,15 @@
|
|||
# FreesearchR 25.12.6
|
||||
|
||||
*NEW* Export missingness table directly.
|
||||
|
||||
*NEW* Updated and slightly extended list of allowed operators for new variable creation.
|
||||
|
||||
*FIX* The exported MS Word documents prompts a warning. The codebase now includes a fix, but it only works running locally, but was disabled.
|
||||
|
||||
# FreesearchR 25.12.5
|
||||
|
||||
*NEW* Added option to add pairwise differences in discriptive table.
|
||||
|
||||
# FreesearchR 25.12.4
|
||||
|
||||
Republish 25.12.3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
app_version <- function()'25.12.3'
|
||||
app_version <- function()'25.12.6'
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ baseline_table <- function(data, fun.args = NULL, fun = gtsummary::tbl_summary,
|
|||
#' mtcars |> create_baseline(by.var = "gear", detail_level = "extended",type = list(gtsummary::all_dichotomous() ~ "categorical"),theme="nejm")
|
||||
#'
|
||||
#' create_baseline(default_parsing(mtcars), by.var = "am", add.p = FALSE, add.overall = FALSE, theme = "lancet")
|
||||
create_baseline <- function(data, ..., by.var, add.p = FALSE, add.overall = FALSE, theme = c("jama", "lancet", "nejm", "qjecon"), detail_level = c("minimal", "extended")) {
|
||||
create_baseline <- function(data, ..., by.var, add.p = FALSE, add.diff=FALSE, add.overall = FALSE, theme = c("jama", "lancet", "nejm", "qjecon"), detail_level = c("minimal", "extended")) {
|
||||
theme <- match.arg(theme)
|
||||
|
||||
detail_level <- match.arg(detail_level)
|
||||
|
|
@ -100,6 +100,10 @@ create_baseline <- function(data, ..., by.var, add.p = FALSE, add.overall = FALS
|
|||
gtsummary::add_p() |>
|
||||
gtsummary::bold_p()
|
||||
}
|
||||
if (isTRUE(add.diff)) {
|
||||
out <- out |>
|
||||
gtsummary::add_difference()
|
||||
}
|
||||
}
|
||||
|
||||
out
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ create_column_ui <- function(id) {
|
|||
htmltools::tagList(
|
||||
# datamods:::html_dependency_datamods(),
|
||||
# html_dependency_FreesearchR(),
|
||||
shiny::tags$head(
|
||||
shiny::tags$link(rel = "stylesheet", type = "text/css", href = "FreesearchR/inst/assets/css/FreesearchR.css")
|
||||
),
|
||||
shiny::tags$head(
|
||||
shiny::tags$link(rel = "stylesheet", type = "text/css", href = "FreesearchR/inst/assets/css/FreesearchR.css")
|
||||
),
|
||||
fluidRow(
|
||||
column(
|
||||
width = 6,
|
||||
|
|
@ -184,35 +184,44 @@ create_column_server <- function(id,
|
|||
#'
|
||||
#' @rdname create-column
|
||||
# @importFrom methods getGroupMembers
|
||||
list_allowed_operations <- function() {
|
||||
c(
|
||||
"(", "c",
|
||||
allowed_operations <- function() {
|
||||
list(
|
||||
"Misc" = c("(", "c",":","~"),
|
||||
# getGroupMembers("Arith"),
|
||||
c("+", "-", "*", "^", "%%", "%/%", "/"),
|
||||
"Arithmetics" = c("+", "-", "*", "^", "%%", "%/%", "/"),
|
||||
# getGroupMembers("Compare"),
|
||||
c("==", ">", "<", "!=", "<=", ">="),
|
||||
"Compare" = c("==", ">", "<", "!=", "<=", ">="),
|
||||
# getGroupMembers("Logic"),
|
||||
c("&", "|"),
|
||||
"Logic" = c("&", "|", "is.na", "ifelse", "any", "all"),
|
||||
# getGroupMembers("Math"),
|
||||
c(
|
||||
"Math" = c(
|
||||
"abs", "sign", "sqrt", "ceiling", "floor", "trunc", "cummax",
|
||||
"cummin", "cumprod", "cumsum", "exp", "expm1", "log", "log10",
|
||||
"log2", "log1p", "cos", "cosh", "sin", "sinh", "tan", "tanh",
|
||||
"acos", "acosh", "asin", "asinh", "atan", "atanh", "cospi", "sinpi",
|
||||
"tanpi", "gamma", "lgamma", "digamma", "trigamma"
|
||||
"tanpi", "gamma", "lgamma", "digamma", "trigamma", "round", "signif"
|
||||
),
|
||||
# getGroupMembers("Math2"),
|
||||
c("round", "signif"),
|
||||
# c("round", "signif"),
|
||||
# getGroupMembers("Summary"),
|
||||
c("max", "min", "range", "prod", "sum", "any", "all"),
|
||||
"pmin", "pmax", "mean",
|
||||
"paste", "paste0", "substr", "nchar", "trimws",
|
||||
"gsub", "sub", "grepl", "ifelse", "length",
|
||||
"as.numeric", "as.character", "as.integer", "as.Date", "as.POSIXct",
|
||||
"as.factor", "factor"
|
||||
"Summary" = c(
|
||||
"max", "min", "range", "prod", "sum", "length",
|
||||
"pmin", "pmax", "mean"
|
||||
),
|
||||
"Text" = c(
|
||||
"paste", "paste0", "substr", "nchar", "trimws",
|
||||
"gsub", "sub", "grepl"
|
||||
),
|
||||
"Class" = c(
|
||||
"as.numeric", "as.character", "as.integer", "as.Date", "as.POSIXct",
|
||||
"as.factor", "factor"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
list_allowed_operations <- function(data=allowed_operations()) {
|
||||
Reduce(c,data)
|
||||
}
|
||||
|
||||
|
||||
#' @inheritParams shiny::modalDialog
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
hosted_version <- function()'v25.12.3-251211'
|
||||
hosted_version <- function()'v25.12.6-251212'
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ data_missings_ui <- function(id, ...) {
|
|||
bslib::accordion_panel(
|
||||
value = "acc_pan_mis",
|
||||
title = "Settings",
|
||||
icon = bsicons::bs_icon("x-circle"),
|
||||
icon = bsicons::bs_icon("gear"),
|
||||
shiny::uiOutput(ns("missings_method")),
|
||||
shiny::uiOutput(ns("missings_var")),
|
||||
shiny::helpText(i18n$t("Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.")),
|
||||
|
|
@ -31,6 +31,16 @@ data_missings_ui <- function(id, ...) {
|
|||
icon = shiny::icon("calculator"),
|
||||
disabled = FALSE
|
||||
)
|
||||
),
|
||||
do.call(
|
||||
bslib::accordion_panel,
|
||||
c(
|
||||
list(
|
||||
title = "Download",
|
||||
icon = bsicons::bs_icon("file-earmark-arrow-down")
|
||||
),
|
||||
table_download_ui(id = ns("tbl_dwn"), title = NULL)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
|
@ -133,10 +143,10 @@ data_missings_server <- function(id,
|
|||
tryCatch(
|
||||
{
|
||||
shiny::withProgress(message = i18n$t("Calculating. Hold tight for a moment.."), {
|
||||
out <- do.call(
|
||||
compare_missings,
|
||||
modifyList(parameters, list(data = df_tbl))
|
||||
)
|
||||
out <- do.call(
|
||||
compare_missings,
|
||||
modifyList(parameters, list(data = df_tbl))
|
||||
)
|
||||
})
|
||||
},
|
||||
error = function(err) {
|
||||
|
|
@ -204,6 +214,13 @@ data_missings_server <- function(id,
|
|||
}
|
||||
)
|
||||
|
||||
|
||||
table_download_server(
|
||||
id = "tbl_dwn",
|
||||
data = shiny::reactive(rv$table),
|
||||
file_name = "missings_table"
|
||||
)
|
||||
|
||||
return(shiny::reactive(rv$table))
|
||||
}
|
||||
)
|
||||
|
|
@ -218,7 +235,8 @@ missing_demo_app <- function() {
|
|||
title = i18n$t("Missings"),
|
||||
icon = bsicons::bs_icon("x-circle")
|
||||
),
|
||||
data_missings_ui(id = "data")
|
||||
data_missings_ui(id = "data"),
|
||||
gt::gt_output("table_p")
|
||||
)
|
||||
)
|
||||
server <- function(input, output, session) {
|
||||
|
|
@ -226,7 +244,15 @@ missing_demo_app <- function() {
|
|||
data_demo[sample(1:32, 10), "cyl"] <- NA
|
||||
data_demo[sample(1:32, 8), "vs"] <- NA
|
||||
|
||||
data_missings_server(id = "data", data = data_demo)
|
||||
rv <- shiny::reactiveValues(
|
||||
table = NULL
|
||||
)
|
||||
|
||||
rv$table <- data_missings_server(id = "data", data = data_demo)
|
||||
|
||||
output$table_p <- gt::render_gt({
|
||||
rv$table
|
||||
})
|
||||
|
||||
# visual_summary_server(id = "visual", data = data_demo)
|
||||
|
||||
|
|
|
|||
|
|
@ -51,12 +51,10 @@ plot_download_server <- function(id,
|
|||
shiny::moduleServer(
|
||||
id = id,
|
||||
module = function(input, output, session) {
|
||||
# ns <- session$ns
|
||||
|
||||
|
||||
|
||||
output$download_plot <- shiny::downloadHandler(
|
||||
filename = paste0(file_name, ".", input$plot_type),
|
||||
filename = function() {
|
||||
paste0(file_name, ".", input$plot_type)
|
||||
},
|
||||
content = function(file) {
|
||||
shiny::withProgress(message = "Saving the plot. Hold on for a moment..", {
|
||||
ggplot2::ggsave(
|
||||
|
|
@ -65,7 +63,8 @@ plot_download_server <- function(id,
|
|||
width = input$plot_width,
|
||||
height = input$plot_height,
|
||||
dpi = 300,
|
||||
units = "mm", scale = 2
|
||||
units = "mm",
|
||||
scale = 2
|
||||
)
|
||||
})
|
||||
}
|
||||
|
|
@ -73,3 +72,57 @@ plot_download_server <- function(id,
|
|||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
plot_download_demo_app <- function() {
|
||||
|
||||
ui <- bslib::page_fillable(
|
||||
title = "Plot Download Demo",
|
||||
bslib::layout_sidebar(
|
||||
sidebar = bslib::sidebar(
|
||||
title = "Download Settings",
|
||||
plot_download_ui(id = "plot_dwn")
|
||||
),
|
||||
bslib::card(
|
||||
bslib::card_header("Sample Plot"),
|
||||
shiny::plotOutput("demo_plot", height = "500px")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
server <- function(input, output, session) {
|
||||
|
||||
# Create a sample ggplot
|
||||
sample_plot <- ggplot2::ggplot(mtcars, ggplot2::aes(x = wt, y = mpg, color = factor(cyl))) +
|
||||
ggplot2::geom_point(size = 3) +
|
||||
ggplot2::geom_smooth(method = "lm", se = TRUE) +
|
||||
ggplot2::labs(
|
||||
title = "Car Weight vs MPG",
|
||||
x = "Weight (1000 lbs)",
|
||||
y = "Miles per Gallon",
|
||||
color = "Cylinders"
|
||||
) +
|
||||
ggplot2::theme_minimal() +
|
||||
ggplot2::theme(
|
||||
plot.title = ggplot2::element_text(size = 16, face = "bold"),
|
||||
legend.position = "bottom"
|
||||
)
|
||||
|
||||
# Display the plot
|
||||
output$demo_plot <- shiny::renderPlot({
|
||||
sample_plot
|
||||
})
|
||||
|
||||
# Connect to download module
|
||||
plot_download_server(
|
||||
id = "plot_dwn",
|
||||
data = sample_plot,
|
||||
file_name = "mtcars_plot"
|
||||
)
|
||||
}
|
||||
|
||||
shiny::shinyApp(ui, server)
|
||||
}
|
||||
|
||||
# Run the demo
|
||||
# plot_download_demo_app()
|
||||
|
|
|
|||
BIN
R/sysdata.rda
BIN
R/sysdata.rda
Binary file not shown.
115
R/table-download-module.R
Normal file
115
R/table-download-module.R
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
table_download_ui <- function(id, title = "Table", ...) {
|
||||
ns <- shiny::NS(id)
|
||||
shiny::tagList(
|
||||
shiny::h4(title),
|
||||
shiny::helpText(i18n$t("Choose your favourite output file format for further work, and download, when the analyses are done.")),
|
||||
shiny::br(),
|
||||
shiny::br(),
|
||||
shiny::selectInput(
|
||||
inputId = ns("output_format"),
|
||||
label = "Output format",
|
||||
selected = NULL,
|
||||
choices = list(
|
||||
"MS Word" = "docx",
|
||||
"Compatible (rtf)" = "rtf"
|
||||
)
|
||||
),
|
||||
shiny::br(),
|
||||
shiny::uiOutput(ns("download_button_container")),
|
||||
# shiny::downloadButton(
|
||||
# outputId = ns("act_table"),
|
||||
# label = "Download table",
|
||||
# icon = shiny::icon("download")
|
||||
# ),
|
||||
shiny::br()
|
||||
)
|
||||
}
|
||||
|
||||
table_download_server <- function(id, data, file_name = "table", ...) {
|
||||
shiny::moduleServer(
|
||||
id = id,
|
||||
module = function(input, output, session) {
|
||||
ns <- session$ns
|
||||
|
||||
output$download_button_container <- shiny::renderUI({
|
||||
# Check if data exists and is valid
|
||||
if (!is.null(data()) && (inherits(data(), "gt_tbl") || inherits(data(), "gtsummary"))) {
|
||||
shiny::downloadButton(
|
||||
outputId = ns("act_table"),
|
||||
label = i18n$t("Download table"),
|
||||
icon = shiny::icon("download")
|
||||
)
|
||||
} else {
|
||||
# Return NULL to show nothing
|
||||
NULL
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
output$act_table <- shiny::downloadHandler(
|
||||
filename = function() {
|
||||
paste0("report.", input$output_format)
|
||||
},
|
||||
content = function(file) {
|
||||
shiny::req(data())
|
||||
type <- input$output_format
|
||||
table <- data()
|
||||
|
||||
shiny::withProgress(message = i18n$t("Generating the report. Hold on for a moment.."), {
|
||||
tryCatch(
|
||||
{
|
||||
# browser()
|
||||
if (inherits(table, "gtsummary")) {
|
||||
table <- gtsummary::as_gt(table)
|
||||
}
|
||||
out <- gt::gtsave(
|
||||
data = table,
|
||||
filename = file # Save to the file path provided by downloadHandler
|
||||
)
|
||||
# This only works locally and was disabled
|
||||
# if (type == "docx") {
|
||||
# out |> doconv::docx_update()
|
||||
# } else {
|
||||
# out
|
||||
# }
|
||||
|
||||
out
|
||||
},
|
||||
error = function(err) {
|
||||
shiny::showNotification(paste0(i18n$t("Error: "), err), type = "error")
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
# In your UI
|
||||
table_download_demo <- function() {
|
||||
ui <- fluidPage(
|
||||
table_download_ui(id = "my_table", title = "Download Results")
|
||||
)
|
||||
|
||||
# In your server
|
||||
server <- function(input, output, session) {
|
||||
# Your data as a reactive
|
||||
my_table_data <- reactive({
|
||||
# This should return a gt or gtsummary table
|
||||
mtcars |>
|
||||
gt::gt() |>
|
||||
gt::tab_header("My Table")
|
||||
})
|
||||
|
||||
# Call the module server - THIS IS CRITICAL
|
||||
table_download_server(
|
||||
id = "my_table", # Must match the UI id
|
||||
data = my_table_data # Pass the reactive (without parentheses)
|
||||
)
|
||||
}
|
||||
shiny::shinyApp(ui, server)
|
||||
}
|
||||
|
||||
# table_download_demo()
|
||||
|
|
@ -400,10 +400,20 @@ ui_elements <- function(selection) {
|
|||
"Yes" = "yes"
|
||||
)
|
||||
),
|
||||
shiny::helpText(i18n$t("Option to perform statistical comparisons between strata in baseline table."))
|
||||
# shiny::helpText(i18n$t("Option to perform statistical comparisons between strata in baseline table.")),
|
||||
shiny::br(),
|
||||
shiny::radioButtons(
|
||||
inputId = "add_diff",
|
||||
label = i18n$t("Include group differences"),
|
||||
selected = "no",
|
||||
inline = TRUE,
|
||||
choices = list(
|
||||
"No" = "no",
|
||||
"Yes" = "yes"
|
||||
)
|
||||
)
|
||||
),
|
||||
shiny::br(),
|
||||
shiny::br(),
|
||||
shiny::actionButton(
|
||||
inputId = "act_eval",
|
||||
label = i18n$t("Evaluate"),
|
||||
|
|
|
|||
20
SESSION.md
20
SESSION.md
|
|
@ -11,11 +11,11 @@
|
|||
|collate |en_US.UTF-8 |
|
||||
|ctype |en_US.UTF-8 |
|
||||
|tz |Europe/Copenhagen |
|
||||
|date |2025-12-11 |
|
||||
|date |2025-12-12 |
|
||||
|rstudio |2025.09.2+418 Cucumberleaf Sunflower (desktop) |
|
||||
|pandoc |3.6.4 @ /opt/homebrew/bin/ (via rmarkdown) |
|
||||
|quarto |1.7.30 @ /usr/local/bin/quarto |
|
||||
|FreesearchR |25.12.3.251211 |
|
||||
|FreesearchR |25.12.6.251212 |
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
|
@ -26,6 +26,8 @@
|
|||
|apexcharter |0.4.4 |2024-09-06 |CRAN (R 4.4.1) |
|
||||
|askpass |1.2.1 |2024-10-04 |CRAN (R 4.4.1) |
|
||||
|assertthat |0.2.1 |2019-03-21 |CRAN (R 4.4.1) |
|
||||
|attachment |0.4.5 |2025-03-14 |CRAN (R 4.4.1) |
|
||||
|attempt |0.3.1 |2020-05-03 |CRAN (R 4.4.1) |
|
||||
|backports |1.5.0 |2024-05-23 |CRAN (R 4.4.1) |
|
||||
|base64enc |0.1-3 |2015-07-28 |CRAN (R 4.4.1) |
|
||||
|bayestestR |0.17.0 |2025-08-29 |CRAN (R 4.4.1) |
|
||||
|
|
@ -63,6 +65,8 @@
|
|||
|devtools |2.4.6 |2025-10-03 |CRAN (R 4.4.1) |
|
||||
|DHARMa |0.4.7 |2024-10-18 |CRAN (R 4.4.1) |
|
||||
|digest |0.6.39 |2025-11-19 |CRAN (R 4.4.3) |
|
||||
|dockerfiler |0.2.5 |2025-05-07 |CRAN (R 4.4.1) |
|
||||
|doconv |0.3.3 |2025-08-18 |CRAN (R 4.4.1) |
|
||||
|doParallel |1.0.17 |2022-02-07 |CRAN (R 4.4.0) |
|
||||
|dplyr |1.1.4 |2023-11-17 |CRAN (R 4.4.0) |
|
||||
|DT |0.34.0 |2025-09-02 |CRAN (R 4.4.1) |
|
||||
|
|
@ -85,7 +89,7 @@
|
|||
|foreach |1.5.2 |2022-02-02 |CRAN (R 4.4.0) |
|
||||
|foreign |0.8-90 |2025-03-31 |CRAN (R 4.4.1) |
|
||||
|Formula |1.2-5 |2023-02-24 |CRAN (R 4.4.1) |
|
||||
|FreesearchR |25.12.3 |NA |NA |
|
||||
|FreesearchR |25.12.6 |NA |NA |
|
||||
|fs |1.6.6 |2025-04-12 |CRAN (R 4.4.1) |
|
||||
|gdtools |0.4.4 |2025-10-06 |CRAN (R 4.4.1) |
|
||||
|generics |0.1.4 |2025-05-09 |CRAN (R 4.4.1) |
|
||||
|
|
@ -123,12 +127,15 @@
|
|||
|lifecycle |1.0.4 |2023-11-07 |CRAN (R 4.4.1) |
|
||||
|litedown |0.8 |2025-11-02 |CRAN (R 4.4.1) |
|
||||
|lme4 |1.1-38 |2025-12-02 |CRAN (R 4.4.3) |
|
||||
|locatexec |0.1.1 |2021-05-19 |CRAN (R 4.4.0) |
|
||||
|lubridate |1.9.4 |2024-12-08 |CRAN (R 4.4.1) |
|
||||
|magick |2.9.0 |2025-09-08 |CRAN (R 4.4.1) |
|
||||
|magrittr |2.0.4 |2025-09-12 |CRAN (R 4.4.1) |
|
||||
|markdown |2.0 |2025-03-23 |CRAN (R 4.4.1) |
|
||||
|MASS |7.3-65 |2025-02-28 |CRAN (R 4.4.1) |
|
||||
|Matrix |1.7-4 |2025-08-28 |CRAN (R 4.4.1) |
|
||||
|memoise |2.0.1 |2021-11-26 |CRAN (R 4.4.0) |
|
||||
|mgcv |1.9-4 |2025-11-07 |CRAN (R 4.4.1) |
|
||||
|mime |0.13 |2025-03-17 |CRAN (R 4.4.1) |
|
||||
|minqa |1.2.8 |2024-08-17 |CRAN (R 4.4.1) |
|
||||
|mvtnorm |1.3-3 |2025-01-10 |CRAN (R 4.4.1) |
|
||||
|
|
@ -145,6 +152,7 @@
|
|||
|parameters |0.28.3 |2025-11-25 |CRAN (R 4.4.3) |
|
||||
|patchwork |1.3.2 |2025-08-25 |CRAN (R 4.4.1) |
|
||||
|pbmcapply |1.5.1 |2022-04-28 |CRAN (R 4.4.1) |
|
||||
|pdftools |3.6.0 |2025-09-10 |CRAN (R 4.4.1) |
|
||||
|performance |0.15.3 |2025-12-01 |CRAN (R 4.4.3) |
|
||||
|phosphoricons |0.2.1 |2024-04-08 |CRAN (R 4.4.0) |
|
||||
|pillar |1.11.1 |2025-09-17 |CRAN (R 4.4.1) |
|
||||
|
|
@ -159,6 +167,7 @@
|
|||
|proxy |0.4-27 |2022-06-09 |CRAN (R 4.4.1) |
|
||||
|ps |1.9.1 |2025-04-12 |CRAN (R 4.4.1) |
|
||||
|purrr |1.2.0 |2025-11-04 |CRAN (R 4.4.1) |
|
||||
|qpdf |1.4.1 |2025-07-02 |CRAN (R 4.4.1) |
|
||||
|qqconf |1.3.2 |2023-04-14 |CRAN (R 4.4.0) |
|
||||
|qqplotr |0.0.7 |2025-09-05 |CRAN (R 4.4.1) |
|
||||
|quarto |1.5.1 |2025-09-04 |CRAN (R 4.4.1) |
|
||||
|
|
@ -202,11 +211,12 @@
|
|||
|sessioninfo |1.2.3 |2025-02-05 |CRAN (R 4.4.1) |
|
||||
|shiny |1.12.1 |2025-12-09 |CRAN (R 4.4.1) |
|
||||
|shiny.i18n |0.3.0 |2023-01-16 |CRAN (R 4.4.0) |
|
||||
|shiny2docker |0.0.3 |2025-06-28 |CRAN (R 4.4.1) |
|
||||
|shinybusy |0.3.3 |2024-03-09 |CRAN (R 4.4.0) |
|
||||
|shinyjs |2.1.0 |2021-12-23 |CRAN (R 4.4.0) |
|
||||
|shinyTime |1.0.3 |2022-08-19 |CRAN (R 4.4.0) |
|
||||
|shinyWidgets |0.9.0 |2025-02-21 |CRAN (R 4.4.1) |
|
||||
|sourcetools |0.1.7-1 |2023-02-01 |CRAN (R 4.4.1) |
|
||||
|smd |0.8.0 |2025-02-12 |CRAN (R 4.4.1) |
|
||||
|stringi |1.8.7 |2025-03-27 |CRAN (R 4.4.1) |
|
||||
|stringr |1.6.0 |2025-11-04 |CRAN (R 4.4.1) |
|
||||
|stRoke |25.9.2 |2025-09-30 |CRAN (R 4.4.1) |
|
||||
|
|
@ -224,7 +234,6 @@
|
|||
|twosamples |2.0.1 |2023-06-23 |CRAN (R 4.4.1) |
|
||||
|tzdb |0.5.0 |2025-03-15 |CRAN (R 4.4.1) |
|
||||
|usethis |3.2.1 |2025-09-06 |CRAN (R 4.4.1) |
|
||||
|utf8 |1.2.6 |2025-06-08 |CRAN (R 4.4.1) |
|
||||
|uuid |1.2-1 |2024-07-29 |CRAN (R 4.4.1) |
|
||||
|V8 |8.0.1 |2025-10-10 |CRAN (R 4.4.1) |
|
||||
|vctrs |0.6.5 |2023-12-01 |CRAN (R 4.4.0) |
|
||||
|
|
@ -237,4 +246,5 @@
|
|||
|xml2 |1.5.1 |2025-12-01 |CRAN (R 4.4.3) |
|
||||
|xtable |1.8-4 |2019-04-21 |CRAN (R 4.4.1) |
|
||||
|yaml |2.3.11 |2025-11-28 |CRAN (R 4.4.3) |
|
||||
|yesno |0.1.3 |2024-07-26 |CRAN (R 4.4.1) |
|
||||
|zip |2.3.3 |2025-05-13 |CRAN (R 4.4.1) |
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
FROM rocker/geospatial:4.4.1
|
||||
RUN apt-get update -y && apt-get install -y cmake make libcurl4-openssl-dev libicu-dev libssl-dev pandoc zlib1g-dev libsecret-1-dev libxml2-dev libx11-dev libcairo2-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libharfbuzz-dev libjpeg-dev libpng-dev libtiff-dev libwebp-dev libfftw3-dev && rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update -y && apt-get install -y cmake make libcurl4-openssl-dev libicu-dev libssl-dev pandoc zlib1g-dev libsecret-1-dev libxml2-dev libx11-dev libmagick++-dev gsfonts libjpeg-dev libpoppler-cpp-dev libcairo2-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libharfbuzz-dev libpng-dev libtiff-dev libwebp-dev libfftw3-dev && rm -rf /var/lib/apt/lists/*
|
||||
RUN mkdir -p /usr/local/lib/R/etc/ /usr/lib/R/etc/
|
||||
RUN echo "options(renv.config.pak.enabled = FALSE, repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl', Ncpus = 4)" | tee /usr/local/lib/R/etc/Rprofile.site | tee /usr/lib/R/etc/Rprofile.site
|
||||
RUN R -e 'install.packages("remotes")'
|
||||
|
|
|
|||
310
app_docker/app.R
310
app_docker/app.R
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
|
||||
########
|
||||
#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmpT9sPX5/file6c80650aba81.R
|
||||
#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmpaYL5kU/file9c7113e28000.R
|
||||
########
|
||||
|
||||
i18n_path <- here::here("translations")
|
||||
|
|
@ -63,7 +63,7 @@ i18n$set_translation_language("en")
|
|||
#### Current file: /Users/au301842/FreesearchR/R//app_version.R
|
||||
########
|
||||
|
||||
app_version <- function()'25.12.3'
|
||||
app_version <- function()'25.12.6'
|
||||
|
||||
|
||||
########
|
||||
|
|
@ -109,7 +109,7 @@ baseline_table <- function(data, fun.args = NULL, fun = gtsummary::tbl_summary,
|
|||
#' mtcars |> create_baseline(by.var = "gear", detail_level = "extended",type = list(gtsummary::all_dichotomous() ~ "categorical"),theme="nejm")
|
||||
#'
|
||||
#' create_baseline(default_parsing(mtcars), by.var = "am", add.p = FALSE, add.overall = FALSE, theme = "lancet")
|
||||
create_baseline <- function(data, ..., by.var, add.p = FALSE, add.overall = FALSE, theme = c("jama", "lancet", "nejm", "qjecon"), detail_level = c("minimal", "extended")) {
|
||||
create_baseline <- function(data, ..., by.var, add.p = FALSE, add.diff=FALSE, add.overall = FALSE, theme = c("jama", "lancet", "nejm", "qjecon"), detail_level = c("minimal", "extended")) {
|
||||
theme <- match.arg(theme)
|
||||
|
||||
detail_level <- match.arg(detail_level)
|
||||
|
|
@ -172,6 +172,10 @@ create_baseline <- function(data, ..., by.var, add.p = FALSE, add.overall = FALS
|
|||
gtsummary::add_p() |>
|
||||
gtsummary::bold_p()
|
||||
}
|
||||
if (isTRUE(add.diff)) {
|
||||
out <- out |>
|
||||
gtsummary::add_difference()
|
||||
}
|
||||
}
|
||||
|
||||
out
|
||||
|
|
@ -449,9 +453,9 @@ create_column_ui <- function(id) {
|
|||
htmltools::tagList(
|
||||
# datamods:::html_dependency_datamods(),
|
||||
# html_dependency_FreesearchR(),
|
||||
shiny::tags$head(
|
||||
shiny::tags$link(rel = "stylesheet", type = "text/css", href = "FreesearchR/inst/assets/css/FreesearchR.css")
|
||||
),
|
||||
shiny::tags$head(
|
||||
shiny::tags$link(rel = "stylesheet", type = "text/css", href = "FreesearchR/inst/assets/css/FreesearchR.css")
|
||||
),
|
||||
fluidRow(
|
||||
column(
|
||||
width = 6,
|
||||
|
|
@ -607,35 +611,44 @@ create_column_server <- function(id,
|
|||
#'
|
||||
#' @rdname create-column
|
||||
# @importFrom methods getGroupMembers
|
||||
list_allowed_operations <- function() {
|
||||
c(
|
||||
"(", "c",
|
||||
allowed_operations <- function() {
|
||||
list(
|
||||
"Misc" = c("(", "c",":","~"),
|
||||
# getGroupMembers("Arith"),
|
||||
c("+", "-", "*", "^", "%%", "%/%", "/"),
|
||||
"Arithmetics" = c("+", "-", "*", "^", "%%", "%/%", "/"),
|
||||
# getGroupMembers("Compare"),
|
||||
c("==", ">", "<", "!=", "<=", ">="),
|
||||
"Compare" = c("==", ">", "<", "!=", "<=", ">="),
|
||||
# getGroupMembers("Logic"),
|
||||
c("&", "|"),
|
||||
"Logic" = c("&", "|", "is.na", "ifelse", "any", "all"),
|
||||
# getGroupMembers("Math"),
|
||||
c(
|
||||
"Math" = c(
|
||||
"abs", "sign", "sqrt", "ceiling", "floor", "trunc", "cummax",
|
||||
"cummin", "cumprod", "cumsum", "exp", "expm1", "log", "log10",
|
||||
"log2", "log1p", "cos", "cosh", "sin", "sinh", "tan", "tanh",
|
||||
"acos", "acosh", "asin", "asinh", "atan", "atanh", "cospi", "sinpi",
|
||||
"tanpi", "gamma", "lgamma", "digamma", "trigamma"
|
||||
"tanpi", "gamma", "lgamma", "digamma", "trigamma", "round", "signif"
|
||||
),
|
||||
# getGroupMembers("Math2"),
|
||||
c("round", "signif"),
|
||||
# c("round", "signif"),
|
||||
# getGroupMembers("Summary"),
|
||||
c("max", "min", "range", "prod", "sum", "any", "all"),
|
||||
"pmin", "pmax", "mean",
|
||||
"paste", "paste0", "substr", "nchar", "trimws",
|
||||
"gsub", "sub", "grepl", "ifelse", "length",
|
||||
"as.numeric", "as.character", "as.integer", "as.Date", "as.POSIXct",
|
||||
"as.factor", "factor"
|
||||
"Summary" = c(
|
||||
"max", "min", "range", "prod", "sum", "length",
|
||||
"pmin", "pmax", "mean"
|
||||
),
|
||||
"Text" = c(
|
||||
"paste", "paste0", "substr", "nchar", "trimws",
|
||||
"gsub", "sub", "grepl"
|
||||
),
|
||||
"Class" = c(
|
||||
"as.numeric", "as.character", "as.integer", "as.Date", "as.POSIXct",
|
||||
"as.factor", "factor"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
list_allowed_operations <- function(data=allowed_operations()) {
|
||||
Reduce(c,data)
|
||||
}
|
||||
|
||||
|
||||
#' @inheritParams shiny::modalDialog
|
||||
|
|
@ -4438,7 +4451,7 @@ data_types <- function() {
|
|||
#### Current file: /Users/au301842/FreesearchR/R//hosted_version.R
|
||||
########
|
||||
|
||||
hosted_version <- function()'v25.12.3-251211'
|
||||
hosted_version <- function()'v25.12.6-251212'
|
||||
|
||||
|
||||
########
|
||||
|
|
@ -5548,7 +5561,7 @@ data_missings_ui <- function(id, ...) {
|
|||
bslib::accordion_panel(
|
||||
value = "acc_pan_mis",
|
||||
title = "Settings",
|
||||
icon = bsicons::bs_icon("x-circle"),
|
||||
icon = bsicons::bs_icon("gear"),
|
||||
shiny::uiOutput(ns("missings_method")),
|
||||
shiny::uiOutput(ns("missings_var")),
|
||||
shiny::helpText(i18n$t("Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.")),
|
||||
|
|
@ -5560,6 +5573,16 @@ data_missings_ui <- function(id, ...) {
|
|||
icon = shiny::icon("calculator"),
|
||||
disabled = FALSE
|
||||
)
|
||||
),
|
||||
do.call(
|
||||
bslib::accordion_panel,
|
||||
c(
|
||||
list(
|
||||
title = "Download",
|
||||
icon = bsicons::bs_icon("file-earmark-arrow-down")
|
||||
),
|
||||
table_download_ui(id = ns("tbl_dwn"), title = NULL)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
|
@ -5662,10 +5685,10 @@ data_missings_server <- function(id,
|
|||
tryCatch(
|
||||
{
|
||||
shiny::withProgress(message = i18n$t("Calculating. Hold tight for a moment.."), {
|
||||
out <- do.call(
|
||||
compare_missings,
|
||||
modifyList(parameters, list(data = df_tbl))
|
||||
)
|
||||
out <- do.call(
|
||||
compare_missings,
|
||||
modifyList(parameters, list(data = df_tbl))
|
||||
)
|
||||
})
|
||||
},
|
||||
error = function(err) {
|
||||
|
|
@ -5733,6 +5756,13 @@ data_missings_server <- function(id,
|
|||
}
|
||||
)
|
||||
|
||||
|
||||
table_download_server(
|
||||
id = "tbl_dwn",
|
||||
data = shiny::reactive(rv$table),
|
||||
file_name = "missings_table"
|
||||
)
|
||||
|
||||
return(shiny::reactive(rv$table))
|
||||
}
|
||||
)
|
||||
|
|
@ -5747,7 +5777,8 @@ missing_demo_app <- function() {
|
|||
title = i18n$t("Missings"),
|
||||
icon = bsicons::bs_icon("x-circle")
|
||||
),
|
||||
data_missings_ui(id = "data")
|
||||
data_missings_ui(id = "data"),
|
||||
gt::gt_output("table_p")
|
||||
)
|
||||
)
|
||||
server <- function(input, output, session) {
|
||||
|
|
@ -5755,7 +5786,15 @@ missing_demo_app <- function() {
|
|||
data_demo[sample(1:32, 10), "cyl"] <- NA
|
||||
data_demo[sample(1:32, 8), "vs"] <- NA
|
||||
|
||||
data_missings_server(id = "data", data = data_demo)
|
||||
rv <- shiny::reactiveValues(
|
||||
table = NULL
|
||||
)
|
||||
|
||||
rv$table <- data_missings_server(id = "data", data = data_demo)
|
||||
|
||||
output$table_p <- gt::render_gt({
|
||||
rv$table
|
||||
})
|
||||
|
||||
# visual_summary_server(id = "visual", data = data_demo)
|
||||
|
||||
|
|
@ -6756,12 +6795,10 @@ plot_download_server <- function(id,
|
|||
shiny::moduleServer(
|
||||
id = id,
|
||||
module = function(input, output, session) {
|
||||
# ns <- session$ns
|
||||
|
||||
|
||||
|
||||
output$download_plot <- shiny::downloadHandler(
|
||||
filename = paste0(file_name, ".", input$plot_type),
|
||||
filename = function() {
|
||||
paste0(file_name, ".", input$plot_type)
|
||||
},
|
||||
content = function(file) {
|
||||
shiny::withProgress(message = "Saving the plot. Hold on for a moment..", {
|
||||
ggplot2::ggsave(
|
||||
|
|
@ -6770,7 +6807,8 @@ plot_download_server <- function(id,
|
|||
width = input$plot_width,
|
||||
height = input$plot_height,
|
||||
dpi = 300,
|
||||
units = "mm", scale = 2
|
||||
units = "mm",
|
||||
scale = 2
|
||||
)
|
||||
})
|
||||
}
|
||||
|
|
@ -6780,6 +6818,60 @@ plot_download_server <- function(id,
|
|||
}
|
||||
|
||||
|
||||
plot_download_demo_app <- function() {
|
||||
|
||||
ui <- bslib::page_fillable(
|
||||
title = "Plot Download Demo",
|
||||
bslib::layout_sidebar(
|
||||
sidebar = bslib::sidebar(
|
||||
title = "Download Settings",
|
||||
plot_download_ui(id = "plot_dwn")
|
||||
),
|
||||
bslib::card(
|
||||
bslib::card_header("Sample Plot"),
|
||||
shiny::plotOutput("demo_plot", height = "500px")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
server <- function(input, output, session) {
|
||||
|
||||
# Create a sample ggplot
|
||||
sample_plot <- ggplot2::ggplot(mtcars, ggplot2::aes(x = wt, y = mpg, color = factor(cyl))) +
|
||||
ggplot2::geom_point(size = 3) +
|
||||
ggplot2::geom_smooth(method = "lm", se = TRUE) +
|
||||
ggplot2::labs(
|
||||
title = "Car Weight vs MPG",
|
||||
x = "Weight (1000 lbs)",
|
||||
y = "Miles per Gallon",
|
||||
color = "Cylinders"
|
||||
) +
|
||||
ggplot2::theme_minimal() +
|
||||
ggplot2::theme(
|
||||
plot.title = ggplot2::element_text(size = 16, face = "bold"),
|
||||
legend.position = "bottom"
|
||||
)
|
||||
|
||||
# Display the plot
|
||||
output$demo_plot <- shiny::renderPlot({
|
||||
sample_plot
|
||||
})
|
||||
|
||||
# Connect to download module
|
||||
plot_download_server(
|
||||
id = "plot_dwn",
|
||||
data = sample_plot,
|
||||
file_name = "mtcars_plot"
|
||||
)
|
||||
}
|
||||
|
||||
shiny::shinyApp(ui, server)
|
||||
}
|
||||
|
||||
# Run the demo
|
||||
# plot_download_demo_app()
|
||||
|
||||
|
||||
########
|
||||
#### Current file: /Users/au301842/FreesearchR/R//redcap_read_shiny_module.R
|
||||
########
|
||||
|
|
@ -9746,6 +9838,127 @@ html_code_wrap <- function(string, lang = "r") {
|
|||
}
|
||||
|
||||
|
||||
########
|
||||
#### Current file: /Users/au301842/FreesearchR/R//table-download-module.R
|
||||
########
|
||||
|
||||
table_download_ui <- function(id, title = "Table", ...) {
|
||||
ns <- shiny::NS(id)
|
||||
shiny::tagList(
|
||||
shiny::h4(title),
|
||||
shiny::helpText(i18n$t("Choose your favourite output file format for further work, and download, when the analyses are done.")),
|
||||
shiny::br(),
|
||||
shiny::br(),
|
||||
shiny::selectInput(
|
||||
inputId = ns("output_format"),
|
||||
label = "Output format",
|
||||
selected = NULL,
|
||||
choices = list(
|
||||
"MS Word" = "docx",
|
||||
"Compatible (rtf)" = "rtf"
|
||||
)
|
||||
),
|
||||
shiny::br(),
|
||||
shiny::uiOutput(ns("download_button_container")),
|
||||
# shiny::downloadButton(
|
||||
# outputId = ns("act_table"),
|
||||
# label = "Download table",
|
||||
# icon = shiny::icon("download")
|
||||
# ),
|
||||
shiny::br()
|
||||
)
|
||||
}
|
||||
|
||||
table_download_server <- function(id, data, file_name = "table", ...) {
|
||||
shiny::moduleServer(
|
||||
id = id,
|
||||
module = function(input, output, session) {
|
||||
ns <- session$ns
|
||||
|
||||
output$download_button_container <- shiny::renderUI({
|
||||
# Check if data exists and is valid
|
||||
if (!is.null(data()) && (inherits(data(), "gt_tbl") || inherits(data(), "gtsummary"))) {
|
||||
shiny::downloadButton(
|
||||
outputId = ns("act_table"),
|
||||
label = i18n$t("Download table"),
|
||||
icon = shiny::icon("download")
|
||||
)
|
||||
} else {
|
||||
# Return NULL to show nothing
|
||||
NULL
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
output$act_table <- shiny::downloadHandler(
|
||||
filename = function() {
|
||||
paste0("report.", input$output_format)
|
||||
},
|
||||
content = function(file) {
|
||||
shiny::req(data())
|
||||
type <- input$output_format
|
||||
table <- data()
|
||||
|
||||
shiny::withProgress(message = i18n$t("Generating the report. Hold on for a moment.."), {
|
||||
tryCatch(
|
||||
{
|
||||
# browser()
|
||||
if (inherits(table, "gtsummary")) {
|
||||
table <- gtsummary::as_gt(table)
|
||||
}
|
||||
out <- gt::gtsave(
|
||||
data = table,
|
||||
filename = file # Save to the file path provided by downloadHandler
|
||||
)
|
||||
# This only works locally and was disabled
|
||||
# if (type == "docx") {
|
||||
# out |> doconv::docx_update()
|
||||
# } else {
|
||||
# out
|
||||
# }
|
||||
|
||||
out
|
||||
},
|
||||
error = function(err) {
|
||||
shiny::showNotification(paste0(i18n$t("Error: "), err), type = "error")
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
# In your UI
|
||||
table_download_demo <- function() {
|
||||
ui <- fluidPage(
|
||||
table_download_ui(id = "my_table", title = "Download Results")
|
||||
)
|
||||
|
||||
# In your server
|
||||
server <- function(input, output, session) {
|
||||
# Your data as a reactive
|
||||
my_table_data <- reactive({
|
||||
# This should return a gt or gtsummary table
|
||||
mtcars |>
|
||||
gt::gt() |>
|
||||
gt::tab_header("My Table")
|
||||
})
|
||||
|
||||
# Call the module server - THIS IS CRITICAL
|
||||
table_download_server(
|
||||
id = "my_table", # Must match the UI id
|
||||
data = my_table_data # Pass the reactive (without parentheses)
|
||||
)
|
||||
}
|
||||
shiny::shinyApp(ui, server)
|
||||
}
|
||||
|
||||
# table_download_demo()
|
||||
|
||||
|
||||
########
|
||||
#### Current file: /Users/au301842/FreesearchR/R//theme.R
|
||||
########
|
||||
|
|
@ -10285,10 +10498,20 @@ ui_elements <- function(selection) {
|
|||
"Yes" = "yes"
|
||||
)
|
||||
),
|
||||
shiny::helpText(i18n$t("Option to perform statistical comparisons between strata in baseline table."))
|
||||
# shiny::helpText(i18n$t("Option to perform statistical comparisons between strata in baseline table.")),
|
||||
shiny::br(),
|
||||
shiny::radioButtons(
|
||||
inputId = "add_diff",
|
||||
label = i18n$t("Include group differences"),
|
||||
selected = "no",
|
||||
inline = TRUE,
|
||||
choices = list(
|
||||
"No" = "no",
|
||||
"Yes" = "yes"
|
||||
)
|
||||
)
|
||||
),
|
||||
shiny::br(),
|
||||
shiny::br(),
|
||||
shiny::actionButton(
|
||||
inputId = "act_eval",
|
||||
label = i18n$t("Evaluate"),
|
||||
|
|
@ -13713,6 +13936,7 @@ server <- function(input, output, session) {
|
|||
by.var = input$strat_var,
|
||||
add.p = input$add_p == "yes",
|
||||
add.overall = TRUE,
|
||||
add.diff = input$add_diff == "yes",
|
||||
# theme = input$baseline_theme,
|
||||
detail_level = input$detail_level
|
||||
)
|
||||
|
|
@ -13885,7 +14109,7 @@ server <- function(input, output, session) {
|
|||
shiny::withProgress(message = i18n$t("Generating the report. Hold on for a moment.."), {
|
||||
tryCatch(
|
||||
{
|
||||
rv$list |>
|
||||
out <- rv$list |>
|
||||
write_rmd(
|
||||
params.args = list(
|
||||
regression.p = rv$list$regression$input$add_regression_p
|
||||
|
|
@ -13893,6 +14117,16 @@ server <- function(input, output, session) {
|
|||
output_format = format,
|
||||
input = file.path(getwd(), "www/report.rmd")
|
||||
)
|
||||
# This only works locally and was disabled
|
||||
# if (type == "docx") {
|
||||
# ## This handles the the following MS Word warning:
|
||||
# ## >> "This document contains fields that may refer to other files."
|
||||
# out |> doconv::docx_update()
|
||||
# } else {
|
||||
# out
|
||||
# }
|
||||
|
||||
out
|
||||
},
|
||||
error = function(err) {
|
||||
showNotification(paste0(i18n$t("We encountered the following error creating your report: "), err), type = "err")
|
||||
|
|
|
|||
|
|
@ -2556,6 +2556,39 @@
|
|||
"Maintainer": "Folashade Daniel <fdaniel@microsoft.com>",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"doconv": {
|
||||
"Package": "doconv",
|
||||
"Version": "0.3.3",
|
||||
"Source": "Repository",
|
||||
"Type": "Package",
|
||||
"Title": "Document Conversion to 'PDF' or 'PNG'",
|
||||
"Authors@R": "c( person(\"David\", \"Gohel\", role = c(\"aut\", \"cre\"), email = \"david.gohel@ardata.fr\"), person(given = \"ArData\", role = \"cph\"), person(\"David\", \"Hajage\", role = \"ctb\", comment = \"initial powershell code\") )",
|
||||
"Description": "It provides the ability to generate images from documents of different types. Three main features are provided: functions for generating document thumbnails, functions for performing visual tests of documents and a function for updating fields and table of contents of a 'Microsoft Word' or 'RTF' document. In order to work, 'LibreOffice' must be installed on the machine and or 'Microsoft Word'. If the latter is available, it can be used to produce PDF documents or images identical to the originals; otherwise, 'LibreOffice' is used and the rendering can be sometimes different from the original documents.",
|
||||
"License": "MIT + file LICENSE",
|
||||
"Encoding": "UTF-8",
|
||||
"RoxygenNote": "7.3.2",
|
||||
"Imports": [
|
||||
"magick",
|
||||
"pdftools",
|
||||
"locatexec",
|
||||
"processx",
|
||||
"tools"
|
||||
],
|
||||
"Depends": [
|
||||
"R (>= 4.0.0)"
|
||||
],
|
||||
"Suggests": [
|
||||
"tinytest",
|
||||
"testthat",
|
||||
"webshot2"
|
||||
],
|
||||
"BugReports": "https://github.com/ardata-fr/doconv/issues",
|
||||
"SystemRequirements": "LibreOffice, Microsoft Word",
|
||||
"NeedsCompilation": "no",
|
||||
"Author": "David Gohel [aut, cre], ArData [cph], David Hajage [ctb] (initial powershell code)",
|
||||
"Maintainer": "David Gohel <david.gohel@ardata.fr>",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"downlit": {
|
||||
"Package": "downlit",
|
||||
"Version": "0.4.5",
|
||||
|
|
@ -5307,6 +5340,26 @@
|
|||
"Maintainer": "Achim Zeileis <Achim.Zeileis@R-project.org>",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"locatexec": {
|
||||
"Package": "locatexec",
|
||||
"Version": "0.1.1",
|
||||
"Source": "Repository",
|
||||
"Type": "Package",
|
||||
"Title": "Detection and Localization of Executable Files",
|
||||
"Authors@R": "c( person(\"David\", \"Gohel\", role = c(\"aut\", \"cre\"), email = \"david.gohel@ardata.fr\"), person(given = \"ArData\", role = \"cph\") )",
|
||||
"Description": "A set of functions to locate some programs available on the user machine. The package provides functions to locate 'Node.js', 'npm', 'LibreOffice', 'Microsoft Word', 'Microsoft PowerPoint', 'Microsoft Excel', 'Python', 'pip', 'Mozilla Firefox' and 'Google Chrome'. User can test the availability of a program with eventually a version and call it with function system2() or system(). This allows the use of a single function to retrieve the path to a program regardless of the operating system and its configuration.",
|
||||
"License": "MIT + file LICENSE",
|
||||
"Encoding": "UTF-8",
|
||||
"RoxygenNote": "7.1.1",
|
||||
"Imports": [
|
||||
"utils"
|
||||
],
|
||||
"BugReports": "https://github.com/ardata-fr/locatexec/issues",
|
||||
"NeedsCompilation": "no",
|
||||
"Author": "David Gohel [aut, cre], ArData [cph]",
|
||||
"Maintainer": "David Gohel <david.gohel@ardata.fr>",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"lubridate": {
|
||||
"Package": "lubridate",
|
||||
"Version": "1.9.4",
|
||||
|
|
@ -5353,6 +5406,54 @@
|
|||
"Author": "Vitalie Spinu [aut, cre], Garrett Grolemund [aut], Hadley Wickham [aut], Davis Vaughan [ctb], Ian Lyttle [ctb], Imanuel Costigan [ctb], Jason Law [ctb], Doug Mitarotonda [ctb], Joseph Larmarange [ctb], Jonathan Boiser [ctb], Chel Hee Lee [ctb]",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"magick": {
|
||||
"Package": "magick",
|
||||
"Version": "2.9.0",
|
||||
"Source": "Repository",
|
||||
"Type": "Package",
|
||||
"Title": "Advanced Graphics and Image-Processing in R",
|
||||
"Authors@R": "person(\"Jeroen\", \"Ooms\", role = c(\"aut\", \"cre\"), email = \"jeroenooms@gmail.com\", comment = c(ORCID = \"0000-0002-4035-0289\"))",
|
||||
"Description": "Bindings to 'ImageMagick': the most comprehensive open-source image processing library available. Supports many common formats (png, jpeg, tiff, pdf, etc) and manipulations (rotate, scale, crop, trim, flip, blur, etc). All operations are vectorized via the Magick++ STL meaning they operate either on a single frame or a series of frames for working with layers, collages, or animation. In RStudio images are automatically previewed when printed to the console, resulting in an interactive editing environment. Also includes a graphics device for creating drawing onto images using pixel coordinates.",
|
||||
"License": "MIT + file LICENSE",
|
||||
"URL": "https://docs.ropensci.org/magick/ https://ropensci.r-universe.dev/magick",
|
||||
"BugReports": "https://github.com/ropensci/magick/issues",
|
||||
"SystemRequirements": "ImageMagick++: ImageMagick-c++-devel (rpm) or libmagick++-dev (deb)",
|
||||
"VignetteBuilder": "knitr",
|
||||
"Depends": [
|
||||
"R (>= 4.1.0)"
|
||||
],
|
||||
"Imports": [
|
||||
"Rcpp (>= 0.12.12)",
|
||||
"magrittr",
|
||||
"curl"
|
||||
],
|
||||
"LinkingTo": [
|
||||
"Rcpp"
|
||||
],
|
||||
"Suggests": [
|
||||
"av",
|
||||
"spelling",
|
||||
"jsonlite",
|
||||
"methods",
|
||||
"knitr",
|
||||
"rmarkdown",
|
||||
"rsvg",
|
||||
"webp",
|
||||
"pdftools",
|
||||
"ggplot2",
|
||||
"gapminder",
|
||||
"IRdisplay",
|
||||
"tesseract",
|
||||
"gifski"
|
||||
],
|
||||
"Encoding": "UTF-8",
|
||||
"RoxygenNote": "7.3.2",
|
||||
"Language": "en-US",
|
||||
"NeedsCompilation": "yes",
|
||||
"Author": "Jeroen Ooms [aut, cre] (ORCID: <https://orcid.org/0000-0002-4035-0289>)",
|
||||
"Maintainer": "Jeroen Ooms <jeroenooms@gmail.com>",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"magrittr": {
|
||||
"Package": "magrittr",
|
||||
"Version": "2.0.4",
|
||||
|
|
@ -6221,6 +6322,38 @@
|
|||
"NeedsCompilation": "yes",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"pdftools": {
|
||||
"Package": "pdftools",
|
||||
"Version": "3.6.0",
|
||||
"Source": "Repository",
|
||||
"Type": "Package",
|
||||
"Title": "Text Extraction, Rendering and Converting of PDF Documents",
|
||||
"Authors@R": "person(\"Jeroen\", \"Ooms\", role = c(\"aut\", \"cre\"), email = \"jeroenooms@gmail.com\", comment = c(ORCID = \"0000-0002-4035-0289\"))",
|
||||
"Description": "Utilities based on 'libpoppler' <https://poppler.freedesktop.org> for extracting text, fonts, attachments and metadata from a PDF file. Also supports high quality rendering of PDF documents into PNG, JPEG, TIFF format, or into raw bitmap vectors for further processing in R.",
|
||||
"License": "MIT + file LICENSE",
|
||||
"URL": "https://ropensci.r-universe.dev/pdftools, https://docs.ropensci.org/pdftools/",
|
||||
"BugReports": "https://github.com/ropensci/pdftools/issues",
|
||||
"SystemRequirements": "Poppler C++ API: libpoppler-cpp-dev (deb) or poppler-cpp-devel (rpm), and poppler-data (rpm/deb) package.",
|
||||
"Encoding": "UTF-8",
|
||||
"Imports": [
|
||||
"Rcpp (>= 0.12.12)",
|
||||
"qpdf"
|
||||
],
|
||||
"LinkingTo": [
|
||||
"Rcpp"
|
||||
],
|
||||
"Suggests": [
|
||||
"png",
|
||||
"webp",
|
||||
"tesseract",
|
||||
"testthat"
|
||||
],
|
||||
"RoxygenNote": "7.3.2",
|
||||
"NeedsCompilation": "yes",
|
||||
"Author": "Jeroen Ooms [aut, cre] (ORCID: <https://orcid.org/0000-0002-4035-0289>)",
|
||||
"Maintainer": "Jeroen Ooms <jeroenooms@gmail.com>",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"performance": {
|
||||
"Package": "performance",
|
||||
"Version": "0.15.3",
|
||||
|
|
@ -6936,6 +7069,36 @@
|
|||
"Author": "Matteo Fasiolo [aut, cre], Ben Griffiths [aut], Simon N. Wood [ctb], Margaux Zaffran [ctb], Yannig Goude [ctb], Raphael Nedellec [ctb]",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"qpdf": {
|
||||
"Package": "qpdf",
|
||||
"Version": "1.4.1",
|
||||
"Source": "Repository",
|
||||
"Type": "Package",
|
||||
"Title": "Split, Combine and Compress PDF Files",
|
||||
"Authors@R": "c(person(\"Jeroen\", \"Ooms\", role = c(\"aut\", \"cre\"), email = \"jeroenooms@gmail.com\", comment = c(ORCID = \"0000-0002-4035-0289\")), person(\"Ben\", \"Raymond\", role = \"ctb\"), person(\"Jay Berkenbilt\", role = \"cph\", comment = \"Author of libqpdf\"))",
|
||||
"Description": "Content-preserving transformations transformations of PDF files such as split, combine, and compress. This package interfaces directly to the 'qpdf' C++ library <https://qpdf.sourceforge.io/> and does not require any command line utilities. Note that 'qpdf' does not read actual content from PDF files: to extract text and data you need the 'pdftools' package.",
|
||||
"License": "Apache License 2.0",
|
||||
"URL": "https://docs.ropensci.org/qpdf/ https://ropensci.r-universe.dev/qpdf",
|
||||
"BugReports": "https://github.com/ropensci/qpdf/issues",
|
||||
"Encoding": "UTF-8",
|
||||
"Imports": [
|
||||
"Rcpp",
|
||||
"askpass",
|
||||
"curl"
|
||||
],
|
||||
"LinkingTo": [
|
||||
"Rcpp"
|
||||
],
|
||||
"RoxygenNote": "7.2.1",
|
||||
"Suggests": [
|
||||
"testthat"
|
||||
],
|
||||
"SystemRequirements": "libjpeg",
|
||||
"NeedsCompilation": "yes",
|
||||
"Author": "Jeroen Ooms [aut, cre] (ORCID: <https://orcid.org/0000-0002-4035-0289>), Ben Raymond [ctb], Jay Berkenbilt [cph] (Author of libqpdf)",
|
||||
"Maintainer": "Jeroen Ooms <jeroenooms@gmail.com>",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"qqconf": {
|
||||
"Package": "qqconf",
|
||||
"Version": "1.3.2",
|
||||
|
|
@ -8397,6 +8560,39 @@
|
|||
"Maintainer": "Dean Attali <daattali@gmail.com>",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"smd": {
|
||||
"Package": "smd",
|
||||
"Version": "0.8.0",
|
||||
"Source": "Repository",
|
||||
"Type": "Package",
|
||||
"Title": "Compute Standardized Mean Differences",
|
||||
"Authors@R": "c(person(\"Bradley\", \"Saul\", role = c(\"aut\", \"cre\"), email = \"bradleysaul@fastmail.com\"), person(\"Alex\", \"Breskin\", role = c(\"ctb\"), email = \"alexbreskin@gmail.com\"), person(\"Catie\", \"Wiener\", role = c(\"ctb\"), email = \"cwiener@live.unc.edu\"), person(\"Matt\", \"Phelan\", role = c(\"ctb\"), email = \"mpphelan1@gmail.com\"), person(\"Daniel\", \"Sjoberg\", role = c(\"ctb\"), email = \"danield.sjoberg@gmail.com\"), person(\"Nuvan\", \"Rathnayaka\", role = c(\"ctb\"), email = \"nuvanrath@proton.me\"), person(\"Malcolm\", \"Barrett\", role = c(\"ctb\"), email = \"malcolmbarrett@gmail.com\") )",
|
||||
"Description": "Computes standardized mean differences and confidence intervals for multiple data types based on Yang, D., & Dalton, J. E. (2012) <https://support.sas.com/resources/papers/proceedings12/335-2012.pdf>.",
|
||||
"Imports": [
|
||||
"MASS (>= 7.3-50)",
|
||||
"methods (>= 3.5.1)"
|
||||
],
|
||||
"Suggests": [
|
||||
"testthat",
|
||||
"stddiff",
|
||||
"tableone",
|
||||
"knitr",
|
||||
"dplyr",
|
||||
"purrr",
|
||||
"markdown",
|
||||
"rmarkdown"
|
||||
],
|
||||
"License": "MIT + file LICENSE",
|
||||
"URL": "https://bsaul.github.io/smd/",
|
||||
"BugReports": "https://github.com/bsaul/smd/issues",
|
||||
"Encoding": "UTF-8",
|
||||
"RoxygenNote": "7.3.2",
|
||||
"VignetteBuilder": "knitr",
|
||||
"Repository": "CRAN",
|
||||
"NeedsCompilation": "no",
|
||||
"Author": "Bradley Saul [aut, cre], Alex Breskin [ctb], Catie Wiener [ctb], Matt Phelan [ctb], Daniel Sjoberg [ctb], Nuvan Rathnayaka [ctb], Malcolm Barrett [ctb]",
|
||||
"Maintainer": "Bradley Saul <bradleysaul@fastmail.com>"
|
||||
},
|
||||
"sourcetools": {
|
||||
"Package": "sourcetools",
|
||||
"Version": "0.1.7-1",
|
||||
|
|
|
|||
|
|
@ -306,3 +306,6 @@
|
|||
"Select outcome variable for overview","Select outcome variable for overview"
|
||||
"No outcome measure chosen","No outcome measure chosen"
|
||||
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."
|
||||
"Include group differences","Include group differences"
|
||||
"Error:","Error:"
|
||||
"Download table","Download table"
|
||||
|
|
|
|||
|
|
|
@ -306,3 +306,6 @@
|
|||
"Select outcome variable for overview","Select outcome variable for overview"
|
||||
"No outcome measure chosen","No outcome measure chosen"
|
||||
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."
|
||||
"Include group differences","Include group differences"
|
||||
"Error:","Error:"
|
||||
"Download table","Download table"
|
||||
|
|
|
|||
|
|
|
@ -306,3 +306,6 @@
|
|||
"Select outcome variable for overview","Select outcome variable for overview"
|
||||
"No outcome measure chosen","No outcome measure chosen"
|
||||
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."
|
||||
"Include group differences","Include group differences"
|
||||
"Error:","Error:"
|
||||
"Download table","Download table"
|
||||
|
|
|
|||
|
|
|
@ -306,3 +306,6 @@
|
|||
"Select outcome variable for overview","Select outcome variable for overview"
|
||||
"No outcome measure chosen","No outcome measure chosen"
|
||||
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."
|
||||
"Include group differences","Include group differences"
|
||||
"Error:","Error:"
|
||||
"Download table","Download table"
|
||||
|
|
|
|||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
|
||||
########
|
||||
#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmpT9sPX5/file6c8068b55910.R
|
||||
#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmpaYL5kU/file9c715011d086.R
|
||||
########
|
||||
|
||||
i18n_path <- system.file("translations", package = "FreesearchR")
|
||||
|
|
@ -63,7 +63,7 @@ i18n$set_translation_language("en")
|
|||
#### Current file: /Users/au301842/FreesearchR/R//app_version.R
|
||||
########
|
||||
|
||||
app_version <- function()'25.12.3'
|
||||
app_version <- function()'25.12.6'
|
||||
|
||||
|
||||
########
|
||||
|
|
@ -109,7 +109,7 @@ baseline_table <- function(data, fun.args = NULL, fun = gtsummary::tbl_summary,
|
|||
#' mtcars |> create_baseline(by.var = "gear", detail_level = "extended",type = list(gtsummary::all_dichotomous() ~ "categorical"),theme="nejm")
|
||||
#'
|
||||
#' create_baseline(default_parsing(mtcars), by.var = "am", add.p = FALSE, add.overall = FALSE, theme = "lancet")
|
||||
create_baseline <- function(data, ..., by.var, add.p = FALSE, add.overall = FALSE, theme = c("jama", "lancet", "nejm", "qjecon"), detail_level = c("minimal", "extended")) {
|
||||
create_baseline <- function(data, ..., by.var, add.p = FALSE, add.diff=FALSE, add.overall = FALSE, theme = c("jama", "lancet", "nejm", "qjecon"), detail_level = c("minimal", "extended")) {
|
||||
theme <- match.arg(theme)
|
||||
|
||||
detail_level <- match.arg(detail_level)
|
||||
|
|
@ -172,6 +172,10 @@ create_baseline <- function(data, ..., by.var, add.p = FALSE, add.overall = FALS
|
|||
gtsummary::add_p() |>
|
||||
gtsummary::bold_p()
|
||||
}
|
||||
if (isTRUE(add.diff)) {
|
||||
out <- out |>
|
||||
gtsummary::add_difference()
|
||||
}
|
||||
}
|
||||
|
||||
out
|
||||
|
|
@ -449,9 +453,9 @@ create_column_ui <- function(id) {
|
|||
htmltools::tagList(
|
||||
# datamods:::html_dependency_datamods(),
|
||||
# html_dependency_FreesearchR(),
|
||||
shiny::tags$head(
|
||||
shiny::tags$link(rel = "stylesheet", type = "text/css", href = "FreesearchR/inst/assets/css/FreesearchR.css")
|
||||
),
|
||||
shiny::tags$head(
|
||||
shiny::tags$link(rel = "stylesheet", type = "text/css", href = "FreesearchR/inst/assets/css/FreesearchR.css")
|
||||
),
|
||||
fluidRow(
|
||||
column(
|
||||
width = 6,
|
||||
|
|
@ -607,35 +611,44 @@ create_column_server <- function(id,
|
|||
#'
|
||||
#' @rdname create-column
|
||||
# @importFrom methods getGroupMembers
|
||||
list_allowed_operations <- function() {
|
||||
c(
|
||||
"(", "c",
|
||||
allowed_operations <- function() {
|
||||
list(
|
||||
"Misc" = c("(", "c",":","~"),
|
||||
# getGroupMembers("Arith"),
|
||||
c("+", "-", "*", "^", "%%", "%/%", "/"),
|
||||
"Arithmetics" = c("+", "-", "*", "^", "%%", "%/%", "/"),
|
||||
# getGroupMembers("Compare"),
|
||||
c("==", ">", "<", "!=", "<=", ">="),
|
||||
"Compare" = c("==", ">", "<", "!=", "<=", ">="),
|
||||
# getGroupMembers("Logic"),
|
||||
c("&", "|"),
|
||||
"Logic" = c("&", "|", "is.na", "ifelse", "any", "all"),
|
||||
# getGroupMembers("Math"),
|
||||
c(
|
||||
"Math" = c(
|
||||
"abs", "sign", "sqrt", "ceiling", "floor", "trunc", "cummax",
|
||||
"cummin", "cumprod", "cumsum", "exp", "expm1", "log", "log10",
|
||||
"log2", "log1p", "cos", "cosh", "sin", "sinh", "tan", "tanh",
|
||||
"acos", "acosh", "asin", "asinh", "atan", "atanh", "cospi", "sinpi",
|
||||
"tanpi", "gamma", "lgamma", "digamma", "trigamma"
|
||||
"tanpi", "gamma", "lgamma", "digamma", "trigamma", "round", "signif"
|
||||
),
|
||||
# getGroupMembers("Math2"),
|
||||
c("round", "signif"),
|
||||
# c("round", "signif"),
|
||||
# getGroupMembers("Summary"),
|
||||
c("max", "min", "range", "prod", "sum", "any", "all"),
|
||||
"pmin", "pmax", "mean",
|
||||
"paste", "paste0", "substr", "nchar", "trimws",
|
||||
"gsub", "sub", "grepl", "ifelse", "length",
|
||||
"as.numeric", "as.character", "as.integer", "as.Date", "as.POSIXct",
|
||||
"as.factor", "factor"
|
||||
"Summary" = c(
|
||||
"max", "min", "range", "prod", "sum", "length",
|
||||
"pmin", "pmax", "mean"
|
||||
),
|
||||
"Text" = c(
|
||||
"paste", "paste0", "substr", "nchar", "trimws",
|
||||
"gsub", "sub", "grepl"
|
||||
),
|
||||
"Class" = c(
|
||||
"as.numeric", "as.character", "as.integer", "as.Date", "as.POSIXct",
|
||||
"as.factor", "factor"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
list_allowed_operations <- function(data=allowed_operations()) {
|
||||
Reduce(c,data)
|
||||
}
|
||||
|
||||
|
||||
#' @inheritParams shiny::modalDialog
|
||||
|
|
@ -4438,7 +4451,7 @@ data_types <- function() {
|
|||
#### Current file: /Users/au301842/FreesearchR/R//hosted_version.R
|
||||
########
|
||||
|
||||
hosted_version <- function()'v25.12.3-251211'
|
||||
hosted_version <- function()'v25.12.6-251212'
|
||||
|
||||
|
||||
########
|
||||
|
|
@ -5548,7 +5561,7 @@ data_missings_ui <- function(id, ...) {
|
|||
bslib::accordion_panel(
|
||||
value = "acc_pan_mis",
|
||||
title = "Settings",
|
||||
icon = bsicons::bs_icon("x-circle"),
|
||||
icon = bsicons::bs_icon("gear"),
|
||||
shiny::uiOutput(ns("missings_method")),
|
||||
shiny::uiOutput(ns("missings_var")),
|
||||
shiny::helpText(i18n$t("Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.")),
|
||||
|
|
@ -5560,6 +5573,16 @@ data_missings_ui <- function(id, ...) {
|
|||
icon = shiny::icon("calculator"),
|
||||
disabled = FALSE
|
||||
)
|
||||
),
|
||||
do.call(
|
||||
bslib::accordion_panel,
|
||||
c(
|
||||
list(
|
||||
title = "Download",
|
||||
icon = bsicons::bs_icon("file-earmark-arrow-down")
|
||||
),
|
||||
table_download_ui(id = ns("tbl_dwn"), title = NULL)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
|
@ -5662,10 +5685,10 @@ data_missings_server <- function(id,
|
|||
tryCatch(
|
||||
{
|
||||
shiny::withProgress(message = i18n$t("Calculating. Hold tight for a moment.."), {
|
||||
out <- do.call(
|
||||
compare_missings,
|
||||
modifyList(parameters, list(data = df_tbl))
|
||||
)
|
||||
out <- do.call(
|
||||
compare_missings,
|
||||
modifyList(parameters, list(data = df_tbl))
|
||||
)
|
||||
})
|
||||
},
|
||||
error = function(err) {
|
||||
|
|
@ -5733,6 +5756,13 @@ data_missings_server <- function(id,
|
|||
}
|
||||
)
|
||||
|
||||
|
||||
table_download_server(
|
||||
id = "tbl_dwn",
|
||||
data = shiny::reactive(rv$table),
|
||||
file_name = "missings_table"
|
||||
)
|
||||
|
||||
return(shiny::reactive(rv$table))
|
||||
}
|
||||
)
|
||||
|
|
@ -5747,7 +5777,8 @@ missing_demo_app <- function() {
|
|||
title = i18n$t("Missings"),
|
||||
icon = bsicons::bs_icon("x-circle")
|
||||
),
|
||||
data_missings_ui(id = "data")
|
||||
data_missings_ui(id = "data"),
|
||||
gt::gt_output("table_p")
|
||||
)
|
||||
)
|
||||
server <- function(input, output, session) {
|
||||
|
|
@ -5755,7 +5786,15 @@ missing_demo_app <- function() {
|
|||
data_demo[sample(1:32, 10), "cyl"] <- NA
|
||||
data_demo[sample(1:32, 8), "vs"] <- NA
|
||||
|
||||
data_missings_server(id = "data", data = data_demo)
|
||||
rv <- shiny::reactiveValues(
|
||||
table = NULL
|
||||
)
|
||||
|
||||
rv$table <- data_missings_server(id = "data", data = data_demo)
|
||||
|
||||
output$table_p <- gt::render_gt({
|
||||
rv$table
|
||||
})
|
||||
|
||||
# visual_summary_server(id = "visual", data = data_demo)
|
||||
|
||||
|
|
@ -6756,12 +6795,10 @@ plot_download_server <- function(id,
|
|||
shiny::moduleServer(
|
||||
id = id,
|
||||
module = function(input, output, session) {
|
||||
# ns <- session$ns
|
||||
|
||||
|
||||
|
||||
output$download_plot <- shiny::downloadHandler(
|
||||
filename = paste0(file_name, ".", input$plot_type),
|
||||
filename = function() {
|
||||
paste0(file_name, ".", input$plot_type)
|
||||
},
|
||||
content = function(file) {
|
||||
shiny::withProgress(message = "Saving the plot. Hold on for a moment..", {
|
||||
ggplot2::ggsave(
|
||||
|
|
@ -6770,7 +6807,8 @@ plot_download_server <- function(id,
|
|||
width = input$plot_width,
|
||||
height = input$plot_height,
|
||||
dpi = 300,
|
||||
units = "mm", scale = 2
|
||||
units = "mm",
|
||||
scale = 2
|
||||
)
|
||||
})
|
||||
}
|
||||
|
|
@ -6780,6 +6818,60 @@ plot_download_server <- function(id,
|
|||
}
|
||||
|
||||
|
||||
plot_download_demo_app <- function() {
|
||||
|
||||
ui <- bslib::page_fillable(
|
||||
title = "Plot Download Demo",
|
||||
bslib::layout_sidebar(
|
||||
sidebar = bslib::sidebar(
|
||||
title = "Download Settings",
|
||||
plot_download_ui(id = "plot_dwn")
|
||||
),
|
||||
bslib::card(
|
||||
bslib::card_header("Sample Plot"),
|
||||
shiny::plotOutput("demo_plot", height = "500px")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
server <- function(input, output, session) {
|
||||
|
||||
# Create a sample ggplot
|
||||
sample_plot <- ggplot2::ggplot(mtcars, ggplot2::aes(x = wt, y = mpg, color = factor(cyl))) +
|
||||
ggplot2::geom_point(size = 3) +
|
||||
ggplot2::geom_smooth(method = "lm", se = TRUE) +
|
||||
ggplot2::labs(
|
||||
title = "Car Weight vs MPG",
|
||||
x = "Weight (1000 lbs)",
|
||||
y = "Miles per Gallon",
|
||||
color = "Cylinders"
|
||||
) +
|
||||
ggplot2::theme_minimal() +
|
||||
ggplot2::theme(
|
||||
plot.title = ggplot2::element_text(size = 16, face = "bold"),
|
||||
legend.position = "bottom"
|
||||
)
|
||||
|
||||
# Display the plot
|
||||
output$demo_plot <- shiny::renderPlot({
|
||||
sample_plot
|
||||
})
|
||||
|
||||
# Connect to download module
|
||||
plot_download_server(
|
||||
id = "plot_dwn",
|
||||
data = sample_plot,
|
||||
file_name = "mtcars_plot"
|
||||
)
|
||||
}
|
||||
|
||||
shiny::shinyApp(ui, server)
|
||||
}
|
||||
|
||||
# Run the demo
|
||||
# plot_download_demo_app()
|
||||
|
||||
|
||||
########
|
||||
#### Current file: /Users/au301842/FreesearchR/R//redcap_read_shiny_module.R
|
||||
########
|
||||
|
|
@ -9746,6 +9838,127 @@ html_code_wrap <- function(string, lang = "r") {
|
|||
}
|
||||
|
||||
|
||||
########
|
||||
#### Current file: /Users/au301842/FreesearchR/R//table-download-module.R
|
||||
########
|
||||
|
||||
table_download_ui <- function(id, title = "Table", ...) {
|
||||
ns <- shiny::NS(id)
|
||||
shiny::tagList(
|
||||
shiny::h4(title),
|
||||
shiny::helpText(i18n$t("Choose your favourite output file format for further work, and download, when the analyses are done.")),
|
||||
shiny::br(),
|
||||
shiny::br(),
|
||||
shiny::selectInput(
|
||||
inputId = ns("output_format"),
|
||||
label = "Output format",
|
||||
selected = NULL,
|
||||
choices = list(
|
||||
"MS Word" = "docx",
|
||||
"Compatible (rtf)" = "rtf"
|
||||
)
|
||||
),
|
||||
shiny::br(),
|
||||
shiny::uiOutput(ns("download_button_container")),
|
||||
# shiny::downloadButton(
|
||||
# outputId = ns("act_table"),
|
||||
# label = "Download table",
|
||||
# icon = shiny::icon("download")
|
||||
# ),
|
||||
shiny::br()
|
||||
)
|
||||
}
|
||||
|
||||
table_download_server <- function(id, data, file_name = "table", ...) {
|
||||
shiny::moduleServer(
|
||||
id = id,
|
||||
module = function(input, output, session) {
|
||||
ns <- session$ns
|
||||
|
||||
output$download_button_container <- shiny::renderUI({
|
||||
# Check if data exists and is valid
|
||||
if (!is.null(data()) && (inherits(data(), "gt_tbl") || inherits(data(), "gtsummary"))) {
|
||||
shiny::downloadButton(
|
||||
outputId = ns("act_table"),
|
||||
label = i18n$t("Download table"),
|
||||
icon = shiny::icon("download")
|
||||
)
|
||||
} else {
|
||||
# Return NULL to show nothing
|
||||
NULL
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
output$act_table <- shiny::downloadHandler(
|
||||
filename = function() {
|
||||
paste0("report.", input$output_format)
|
||||
},
|
||||
content = function(file) {
|
||||
shiny::req(data())
|
||||
type <- input$output_format
|
||||
table <- data()
|
||||
|
||||
shiny::withProgress(message = i18n$t("Generating the report. Hold on for a moment.."), {
|
||||
tryCatch(
|
||||
{
|
||||
# browser()
|
||||
if (inherits(table, "gtsummary")) {
|
||||
table <- gtsummary::as_gt(table)
|
||||
}
|
||||
out <- gt::gtsave(
|
||||
data = table,
|
||||
filename = file # Save to the file path provided by downloadHandler
|
||||
)
|
||||
# This only works locally and was disabled
|
||||
# if (type == "docx") {
|
||||
# out |> doconv::docx_update()
|
||||
# } else {
|
||||
# out
|
||||
# }
|
||||
|
||||
out
|
||||
},
|
||||
error = function(err) {
|
||||
shiny::showNotification(paste0(i18n$t("Error: "), err), type = "error")
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
# In your UI
|
||||
table_download_demo <- function() {
|
||||
ui <- fluidPage(
|
||||
table_download_ui(id = "my_table", title = "Download Results")
|
||||
)
|
||||
|
||||
# In your server
|
||||
server <- function(input, output, session) {
|
||||
# Your data as a reactive
|
||||
my_table_data <- reactive({
|
||||
# This should return a gt or gtsummary table
|
||||
mtcars |>
|
||||
gt::gt() |>
|
||||
gt::tab_header("My Table")
|
||||
})
|
||||
|
||||
# Call the module server - THIS IS CRITICAL
|
||||
table_download_server(
|
||||
id = "my_table", # Must match the UI id
|
||||
data = my_table_data # Pass the reactive (without parentheses)
|
||||
)
|
||||
}
|
||||
shiny::shinyApp(ui, server)
|
||||
}
|
||||
|
||||
# table_download_demo()
|
||||
|
||||
|
||||
########
|
||||
#### Current file: /Users/au301842/FreesearchR/R//theme.R
|
||||
########
|
||||
|
|
@ -10285,10 +10498,20 @@ ui_elements <- function(selection) {
|
|||
"Yes" = "yes"
|
||||
)
|
||||
),
|
||||
shiny::helpText(i18n$t("Option to perform statistical comparisons between strata in baseline table."))
|
||||
# shiny::helpText(i18n$t("Option to perform statistical comparisons between strata in baseline table.")),
|
||||
shiny::br(),
|
||||
shiny::radioButtons(
|
||||
inputId = "add_diff",
|
||||
label = i18n$t("Include group differences"),
|
||||
selected = "no",
|
||||
inline = TRUE,
|
||||
choices = list(
|
||||
"No" = "no",
|
||||
"Yes" = "yes"
|
||||
)
|
||||
)
|
||||
),
|
||||
shiny::br(),
|
||||
shiny::br(),
|
||||
shiny::actionButton(
|
||||
inputId = "act_eval",
|
||||
label = i18n$t("Evaluate"),
|
||||
|
|
@ -13713,6 +13936,7 @@ server <- function(input, output, session) {
|
|||
by.var = input$strat_var,
|
||||
add.p = input$add_p == "yes",
|
||||
add.overall = TRUE,
|
||||
add.diff = input$add_diff == "yes",
|
||||
# theme = input$baseline_theme,
|
||||
detail_level = input$detail_level
|
||||
)
|
||||
|
|
@ -13885,7 +14109,7 @@ server <- function(input, output, session) {
|
|||
shiny::withProgress(message = i18n$t("Generating the report. Hold on for a moment.."), {
|
||||
tryCatch(
|
||||
{
|
||||
rv$list |>
|
||||
out <- rv$list |>
|
||||
write_rmd(
|
||||
params.args = list(
|
||||
regression.p = rv$list$regression$input$add_regression_p
|
||||
|
|
@ -13893,6 +14117,16 @@ server <- function(input, output, session) {
|
|||
output_format = format,
|
||||
input = file.path(getwd(), "www/report.rmd")
|
||||
)
|
||||
# This only works locally and was disabled
|
||||
# if (type == "docx") {
|
||||
# ## This handles the the following MS Word warning:
|
||||
# ## >> "This document contains fields that may refer to other files."
|
||||
# out |> doconv::docx_update()
|
||||
# } else {
|
||||
# out
|
||||
# }
|
||||
|
||||
out
|
||||
},
|
||||
error = function(err) {
|
||||
showNotification(paste0(i18n$t("We encountered the following error creating your report: "), err), type = "err")
|
||||
|
|
|
|||
|
|
@ -306,3 +306,6 @@
|
|||
"Select outcome variable for overview","Select outcome variable for overview"
|
||||
"No outcome measure chosen","No outcome measure chosen"
|
||||
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."
|
||||
"Include group differences","Include group differences"
|
||||
"Error:","Error:"
|
||||
"Download table","Download table"
|
||||
|
|
|
|||
|
|
|
@ -306,3 +306,6 @@
|
|||
"Select outcome variable for overview","Select outcome variable for overview"
|
||||
"No outcome measure chosen","No outcome measure chosen"
|
||||
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."
|
||||
"Include group differences","Include group differences"
|
||||
"Error:","Error:"
|
||||
"Download table","Download table"
|
||||
|
|
|
|||
|
|
|
@ -306,3 +306,6 @@
|
|||
"Select outcome variable for overview","Select outcome variable for overview"
|
||||
"No outcome measure chosen","No outcome measure chosen"
|
||||
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."
|
||||
"Include group differences","Include group differences"
|
||||
"Error:","Error:"
|
||||
"Download table","Download table"
|
||||
|
|
|
|||
|
|
|
@ -306,3 +306,6 @@
|
|||
"Select outcome variable for overview","Select outcome variable for overview"
|
||||
"No outcome measure chosen","No outcome measure chosen"
|
||||
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."
|
||||
"Include group differences","Include group differences"
|
||||
"Error:","Error:"
|
||||
"Download table","Download table"
|
||||
|
|
|
|||
|
|
|
@ -4,7 +4,7 @@
|
|||
\alias{create-column}
|
||||
\alias{create_column_ui}
|
||||
\alias{create_column_server}
|
||||
\alias{list_allowed_operations}
|
||||
\alias{allowed_operations}
|
||||
\alias{modal_create_column}
|
||||
\alias{winbox_create_column}
|
||||
\title{Create new column}
|
||||
|
|
@ -17,7 +17,7 @@ create_column_server(
|
|||
allowed_operations = list_allowed_operations()
|
||||
)
|
||||
|
||||
list_allowed_operations()
|
||||
allowed_operations()
|
||||
|
||||
modal_create_column(
|
||||
id,
|
||||
|
|
@ -68,7 +68,7 @@ A \code{\link[shiny:reactive]{shiny::reactive()}} function returning the data.
|
|||
This module allow to enter an expression to create a new column in a \code{data.frame}.
|
||||
}
|
||||
\note{
|
||||
User can only use a subset of function: (, c, +, -, *, ^, \%\%, \%/\%, /, ==, >, <, !=, <=, >=, &, |, abs, sign, sqrt, ceiling, floor, trunc, cummax, cummin, cumprod, cumsum, exp, expm1, log, log10, log2, log1p, cos, cosh, sin, sinh, tan, tanh, acos, acosh, asin, asinh, atan, atanh, cospi, sinpi, tanpi, gamma, lgamma, digamma, trigamma, round, signif, max, min, range, prod, sum, any, all, pmin, pmax, mean, paste, paste0, substr, nchar, trimws, gsub, sub, grepl, ifelse, length, as.numeric, as.character, as.integer, as.Date, as.POSIXct, as.factor, factor.
|
||||
User can only use a subset of function: (, c, :, ~, +, -, *, ^, \%\%, \%/\%, /, ==, >, <, !=, <=, >=, &, |, is.na, ifelse, any, all, abs, sign, sqrt, ceiling, floor, trunc, cummax, cummin, cumprod, cumsum, exp, expm1, log, log10, log2, log1p, cos, cosh, sin, sinh, tan, tanh, acos, acosh, asin, asinh, atan, atanh, cospi, sinpi, tanpi, gamma, lgamma, digamma, trigamma, round, signif, max, min, range, prod, sum, length, pmin, pmax, mean, paste, paste0, substr, nchar, trimws, gsub, sub, grepl, as.numeric, as.character, as.integer, as.Date, as.POSIXct, as.factor, factor.
|
||||
You can add more operations using the \code{allowed_operations} argument, for example if you want to allow to use package lubridate, you can do:
|
||||
|
||||
\if{html}{\out{<div class="sourceCode r">}}\preformatted{c(list_allowed_operations(), getNamespaceExports("lubridate"))
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ create_baseline(
|
|||
...,
|
||||
by.var,
|
||||
add.p = FALSE,
|
||||
add.diff = FALSE,
|
||||
add.overall = FALSE,
|
||||
theme = c("jama", "lancet", "nejm", "qjecon"),
|
||||
detail_level = c("minimal", "extended")
|
||||
|
|
|
|||
196
renv.lock
196
renv.lock
|
|
@ -2556,6 +2556,39 @@
|
|||
"Maintainer": "Folashade Daniel <fdaniel@microsoft.com>",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"doconv": {
|
||||
"Package": "doconv",
|
||||
"Version": "0.3.3",
|
||||
"Source": "Repository",
|
||||
"Type": "Package",
|
||||
"Title": "Document Conversion to 'PDF' or 'PNG'",
|
||||
"Authors@R": "c( person(\"David\", \"Gohel\", role = c(\"aut\", \"cre\"), email = \"david.gohel@ardata.fr\"), person(given = \"ArData\", role = \"cph\"), person(\"David\", \"Hajage\", role = \"ctb\", comment = \"initial powershell code\") )",
|
||||
"Description": "It provides the ability to generate images from documents of different types. Three main features are provided: functions for generating document thumbnails, functions for performing visual tests of documents and a function for updating fields and table of contents of a 'Microsoft Word' or 'RTF' document. In order to work, 'LibreOffice' must be installed on the machine and or 'Microsoft Word'. If the latter is available, it can be used to produce PDF documents or images identical to the originals; otherwise, 'LibreOffice' is used and the rendering can be sometimes different from the original documents.",
|
||||
"License": "MIT + file LICENSE",
|
||||
"Encoding": "UTF-8",
|
||||
"RoxygenNote": "7.3.2",
|
||||
"Imports": [
|
||||
"magick",
|
||||
"pdftools",
|
||||
"locatexec",
|
||||
"processx",
|
||||
"tools"
|
||||
],
|
||||
"Depends": [
|
||||
"R (>= 4.0.0)"
|
||||
],
|
||||
"Suggests": [
|
||||
"tinytest",
|
||||
"testthat",
|
||||
"webshot2"
|
||||
],
|
||||
"BugReports": "https://github.com/ardata-fr/doconv/issues",
|
||||
"SystemRequirements": "LibreOffice, Microsoft Word",
|
||||
"NeedsCompilation": "no",
|
||||
"Author": "David Gohel [aut, cre], ArData [cph], David Hajage [ctb] (initial powershell code)",
|
||||
"Maintainer": "David Gohel <david.gohel@ardata.fr>",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"downlit": {
|
||||
"Package": "downlit",
|
||||
"Version": "0.4.5",
|
||||
|
|
@ -5307,6 +5340,26 @@
|
|||
"Maintainer": "Achim Zeileis <Achim.Zeileis@R-project.org>",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"locatexec": {
|
||||
"Package": "locatexec",
|
||||
"Version": "0.1.1",
|
||||
"Source": "Repository",
|
||||
"Type": "Package",
|
||||
"Title": "Detection and Localization of Executable Files",
|
||||
"Authors@R": "c( person(\"David\", \"Gohel\", role = c(\"aut\", \"cre\"), email = \"david.gohel@ardata.fr\"), person(given = \"ArData\", role = \"cph\") )",
|
||||
"Description": "A set of functions to locate some programs available on the user machine. The package provides functions to locate 'Node.js', 'npm', 'LibreOffice', 'Microsoft Word', 'Microsoft PowerPoint', 'Microsoft Excel', 'Python', 'pip', 'Mozilla Firefox' and 'Google Chrome'. User can test the availability of a program with eventually a version and call it with function system2() or system(). This allows the use of a single function to retrieve the path to a program regardless of the operating system and its configuration.",
|
||||
"License": "MIT + file LICENSE",
|
||||
"Encoding": "UTF-8",
|
||||
"RoxygenNote": "7.1.1",
|
||||
"Imports": [
|
||||
"utils"
|
||||
],
|
||||
"BugReports": "https://github.com/ardata-fr/locatexec/issues",
|
||||
"NeedsCompilation": "no",
|
||||
"Author": "David Gohel [aut, cre], ArData [cph]",
|
||||
"Maintainer": "David Gohel <david.gohel@ardata.fr>",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"lubridate": {
|
||||
"Package": "lubridate",
|
||||
"Version": "1.9.4",
|
||||
|
|
@ -5353,6 +5406,54 @@
|
|||
"Author": "Vitalie Spinu [aut, cre], Garrett Grolemund [aut], Hadley Wickham [aut], Davis Vaughan [ctb], Ian Lyttle [ctb], Imanuel Costigan [ctb], Jason Law [ctb], Doug Mitarotonda [ctb], Joseph Larmarange [ctb], Jonathan Boiser [ctb], Chel Hee Lee [ctb]",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"magick": {
|
||||
"Package": "magick",
|
||||
"Version": "2.9.0",
|
||||
"Source": "Repository",
|
||||
"Type": "Package",
|
||||
"Title": "Advanced Graphics and Image-Processing in R",
|
||||
"Authors@R": "person(\"Jeroen\", \"Ooms\", role = c(\"aut\", \"cre\"), email = \"jeroenooms@gmail.com\", comment = c(ORCID = \"0000-0002-4035-0289\"))",
|
||||
"Description": "Bindings to 'ImageMagick': the most comprehensive open-source image processing library available. Supports many common formats (png, jpeg, tiff, pdf, etc) and manipulations (rotate, scale, crop, trim, flip, blur, etc). All operations are vectorized via the Magick++ STL meaning they operate either on a single frame or a series of frames for working with layers, collages, or animation. In RStudio images are automatically previewed when printed to the console, resulting in an interactive editing environment. Also includes a graphics device for creating drawing onto images using pixel coordinates.",
|
||||
"License": "MIT + file LICENSE",
|
||||
"URL": "https://docs.ropensci.org/magick/ https://ropensci.r-universe.dev/magick",
|
||||
"BugReports": "https://github.com/ropensci/magick/issues",
|
||||
"SystemRequirements": "ImageMagick++: ImageMagick-c++-devel (rpm) or libmagick++-dev (deb)",
|
||||
"VignetteBuilder": "knitr",
|
||||
"Depends": [
|
||||
"R (>= 4.1.0)"
|
||||
],
|
||||
"Imports": [
|
||||
"Rcpp (>= 0.12.12)",
|
||||
"magrittr",
|
||||
"curl"
|
||||
],
|
||||
"LinkingTo": [
|
||||
"Rcpp"
|
||||
],
|
||||
"Suggests": [
|
||||
"av",
|
||||
"spelling",
|
||||
"jsonlite",
|
||||
"methods",
|
||||
"knitr",
|
||||
"rmarkdown",
|
||||
"rsvg",
|
||||
"webp",
|
||||
"pdftools",
|
||||
"ggplot2",
|
||||
"gapminder",
|
||||
"IRdisplay",
|
||||
"tesseract",
|
||||
"gifski"
|
||||
],
|
||||
"Encoding": "UTF-8",
|
||||
"RoxygenNote": "7.3.2",
|
||||
"Language": "en-US",
|
||||
"NeedsCompilation": "yes",
|
||||
"Author": "Jeroen Ooms [aut, cre] (ORCID: <https://orcid.org/0000-0002-4035-0289>)",
|
||||
"Maintainer": "Jeroen Ooms <jeroenooms@gmail.com>",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"magrittr": {
|
||||
"Package": "magrittr",
|
||||
"Version": "2.0.4",
|
||||
|
|
@ -6221,6 +6322,38 @@
|
|||
"NeedsCompilation": "yes",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"pdftools": {
|
||||
"Package": "pdftools",
|
||||
"Version": "3.6.0",
|
||||
"Source": "Repository",
|
||||
"Type": "Package",
|
||||
"Title": "Text Extraction, Rendering and Converting of PDF Documents",
|
||||
"Authors@R": "person(\"Jeroen\", \"Ooms\", role = c(\"aut\", \"cre\"), email = \"jeroenooms@gmail.com\", comment = c(ORCID = \"0000-0002-4035-0289\"))",
|
||||
"Description": "Utilities based on 'libpoppler' <https://poppler.freedesktop.org> for extracting text, fonts, attachments and metadata from a PDF file. Also supports high quality rendering of PDF documents into PNG, JPEG, TIFF format, or into raw bitmap vectors for further processing in R.",
|
||||
"License": "MIT + file LICENSE",
|
||||
"URL": "https://ropensci.r-universe.dev/pdftools, https://docs.ropensci.org/pdftools/",
|
||||
"BugReports": "https://github.com/ropensci/pdftools/issues",
|
||||
"SystemRequirements": "Poppler C++ API: libpoppler-cpp-dev (deb) or poppler-cpp-devel (rpm), and poppler-data (rpm/deb) package.",
|
||||
"Encoding": "UTF-8",
|
||||
"Imports": [
|
||||
"Rcpp (>= 0.12.12)",
|
||||
"qpdf"
|
||||
],
|
||||
"LinkingTo": [
|
||||
"Rcpp"
|
||||
],
|
||||
"Suggests": [
|
||||
"png",
|
||||
"webp",
|
||||
"tesseract",
|
||||
"testthat"
|
||||
],
|
||||
"RoxygenNote": "7.3.2",
|
||||
"NeedsCompilation": "yes",
|
||||
"Author": "Jeroen Ooms [aut, cre] (ORCID: <https://orcid.org/0000-0002-4035-0289>)",
|
||||
"Maintainer": "Jeroen Ooms <jeroenooms@gmail.com>",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"performance": {
|
||||
"Package": "performance",
|
||||
"Version": "0.15.3",
|
||||
|
|
@ -6936,6 +7069,36 @@
|
|||
"Author": "Matteo Fasiolo [aut, cre], Ben Griffiths [aut], Simon N. Wood [ctb], Margaux Zaffran [ctb], Yannig Goude [ctb], Raphael Nedellec [ctb]",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"qpdf": {
|
||||
"Package": "qpdf",
|
||||
"Version": "1.4.1",
|
||||
"Source": "Repository",
|
||||
"Type": "Package",
|
||||
"Title": "Split, Combine and Compress PDF Files",
|
||||
"Authors@R": "c(person(\"Jeroen\", \"Ooms\", role = c(\"aut\", \"cre\"), email = \"jeroenooms@gmail.com\", comment = c(ORCID = \"0000-0002-4035-0289\")), person(\"Ben\", \"Raymond\", role = \"ctb\"), person(\"Jay Berkenbilt\", role = \"cph\", comment = \"Author of libqpdf\"))",
|
||||
"Description": "Content-preserving transformations transformations of PDF files such as split, combine, and compress. This package interfaces directly to the 'qpdf' C++ library <https://qpdf.sourceforge.io/> and does not require any command line utilities. Note that 'qpdf' does not read actual content from PDF files: to extract text and data you need the 'pdftools' package.",
|
||||
"License": "Apache License 2.0",
|
||||
"URL": "https://docs.ropensci.org/qpdf/ https://ropensci.r-universe.dev/qpdf",
|
||||
"BugReports": "https://github.com/ropensci/qpdf/issues",
|
||||
"Encoding": "UTF-8",
|
||||
"Imports": [
|
||||
"Rcpp",
|
||||
"askpass",
|
||||
"curl"
|
||||
],
|
||||
"LinkingTo": [
|
||||
"Rcpp"
|
||||
],
|
||||
"RoxygenNote": "7.2.1",
|
||||
"Suggests": [
|
||||
"testthat"
|
||||
],
|
||||
"SystemRequirements": "libjpeg",
|
||||
"NeedsCompilation": "yes",
|
||||
"Author": "Jeroen Ooms [aut, cre] (ORCID: <https://orcid.org/0000-0002-4035-0289>), Ben Raymond [ctb], Jay Berkenbilt [cph] (Author of libqpdf)",
|
||||
"Maintainer": "Jeroen Ooms <jeroenooms@gmail.com>",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"qqconf": {
|
||||
"Package": "qqconf",
|
||||
"Version": "1.3.2",
|
||||
|
|
@ -8397,6 +8560,39 @@
|
|||
"Maintainer": "Dean Attali <daattali@gmail.com>",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
"smd": {
|
||||
"Package": "smd",
|
||||
"Version": "0.8.0",
|
||||
"Source": "Repository",
|
||||
"Type": "Package",
|
||||
"Title": "Compute Standardized Mean Differences",
|
||||
"Authors@R": "c(person(\"Bradley\", \"Saul\", role = c(\"aut\", \"cre\"), email = \"bradleysaul@fastmail.com\"), person(\"Alex\", \"Breskin\", role = c(\"ctb\"), email = \"alexbreskin@gmail.com\"), person(\"Catie\", \"Wiener\", role = c(\"ctb\"), email = \"cwiener@live.unc.edu\"), person(\"Matt\", \"Phelan\", role = c(\"ctb\"), email = \"mpphelan1@gmail.com\"), person(\"Daniel\", \"Sjoberg\", role = c(\"ctb\"), email = \"danield.sjoberg@gmail.com\"), person(\"Nuvan\", \"Rathnayaka\", role = c(\"ctb\"), email = \"nuvanrath@proton.me\"), person(\"Malcolm\", \"Barrett\", role = c(\"ctb\"), email = \"malcolmbarrett@gmail.com\") )",
|
||||
"Description": "Computes standardized mean differences and confidence intervals for multiple data types based on Yang, D., & Dalton, J. E. (2012) <https://support.sas.com/resources/papers/proceedings12/335-2012.pdf>.",
|
||||
"Imports": [
|
||||
"MASS (>= 7.3-50)",
|
||||
"methods (>= 3.5.1)"
|
||||
],
|
||||
"Suggests": [
|
||||
"testthat",
|
||||
"stddiff",
|
||||
"tableone",
|
||||
"knitr",
|
||||
"dplyr",
|
||||
"purrr",
|
||||
"markdown",
|
||||
"rmarkdown"
|
||||
],
|
||||
"License": "MIT + file LICENSE",
|
||||
"URL": "https://bsaul.github.io/smd/",
|
||||
"BugReports": "https://github.com/bsaul/smd/issues",
|
||||
"Encoding": "UTF-8",
|
||||
"RoxygenNote": "7.3.2",
|
||||
"VignetteBuilder": "knitr",
|
||||
"Repository": "CRAN",
|
||||
"NeedsCompilation": "no",
|
||||
"Author": "Bradley Saul [aut, cre], Alex Breskin [ctb], Catie Wiener [ctb], Matt Phelan [ctb], Daniel Sjoberg [ctb], Nuvan Rathnayaka [ctb], Malcolm Barrett [ctb]",
|
||||
"Maintainer": "Bradley Saul <bradleysaul@fastmail.com>"
|
||||
},
|
||||
"sourcetools": {
|
||||
"Package": "sourcetools",
|
||||
"Version": "0.1.7-1",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue