mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-12-15 00:52:09 +01:00
Compare commits
40 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ed74e0492c | |||
| d9614eb37f | |||
| 30f13c7232 | |||
| f4f433ee84 | |||
| 2a580965e3 | |||
| 208590e91f | |||
| 35afbc1dc9 | |||
| af523edc00 | |||
| fab5c6cf22 | |||
| f2c1c974e0 | |||
| cc853b2ede | |||
| 8c7fafe51c | |||
| 987069dd90 | |||
| d0d4e950d1 | |||
| 54dd332cd8 | |||
| c2fa49e914 | |||
| 67e425d510 | |||
| fde5a22526 | |||
|
|
735ef71425 | ||
|
|
8e9901a64e | ||
| f82ee16cd3 | |||
| 653424692d | |||
| 747670bb57 | |||
| 913844d34b | |||
| ae9aa2e6f5 | |||
| ebc8c65628 | |||
| 5a632e60fa | |||
| a1cc2d8955 | |||
| b21077b52d | |||
| 5249c7c2c0 | |||
| 901864acff | |||
| 48f4d99429 | |||
| 59cefc55a3 | |||
| 61ca275690 | |||
| b9008543ee | |||
| 9d5f6a8b4f | |||
| 51629b6349 | |||
| c999d894c1 | |||
| f9758be525 | |||
| 0c2b061708 |
79 changed files with 10003 additions and 2532 deletions
152
CITATION.cff
152
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.10.3
|
||||
version: 25.12.6
|
||||
doi: 10.5281/zenodo.14527429
|
||||
identifiers:
|
||||
- type: url
|
||||
|
|
@ -143,7 +143,7 @@ references:
|
|||
authors:
|
||||
- family-names: Müller
|
||||
given-names: Kirill
|
||||
email: krlmlr+r@mailbox.org
|
||||
email: kirill@cynkra.com
|
||||
orcid: https://orcid.org/0000-0002-1416-3412
|
||||
year: '2025'
|
||||
doi: 10.32614/CRAN.package.here
|
||||
|
|
@ -250,6 +250,10 @@ references:
|
|||
given-names: Barret
|
||||
email: barret@posit.co
|
||||
orcid: https://orcid.org/0000-0001-9986-114X
|
||||
- family-names: Aden-Buie
|
||||
given-names: Garrick
|
||||
email: garrick@adenbuie.com
|
||||
orcid: https://orcid.org/0000-0002-7111-0077
|
||||
- family-names: Xie
|
||||
given-names: Yihui
|
||||
email: yihui@posit.co
|
||||
|
|
@ -312,6 +316,10 @@ references:
|
|||
given-names: Simon
|
||||
email: simon.couch@posit.co
|
||||
orcid: https://orcid.org/0000-0001-5676-5107
|
||||
- family-names: Hvitfeldt
|
||||
given-names: Emil
|
||||
email: emil.hvitfeldt@posit.co
|
||||
orcid: https://orcid.org/0000-0002-0679-1945
|
||||
year: '2025'
|
||||
doi: 10.32614/CRAN.package.broom
|
||||
- type: software
|
||||
|
|
@ -397,6 +405,10 @@ references:
|
|||
email: joe@posit.co
|
||||
- family-names: Tan
|
||||
given-names: Xianying
|
||||
- family-names: Aden-Buie
|
||||
given-names: Garrick
|
||||
email: garrick@posit.co
|
||||
orcid: https://orcid.org/0000-0002-7111-0077
|
||||
year: '2025'
|
||||
doi: 10.32614/CRAN.package.DT
|
||||
- type: software
|
||||
|
|
@ -480,6 +492,10 @@ references:
|
|||
given-names: Brenton M.
|
||||
email: brenton@wiernik.org
|
||||
orcid: https://orcid.org/0000-0001-9560-6336
|
||||
- family-names: Thériault
|
||||
given-names: Rémi
|
||||
email: remi.theriault@mail.mcgill.ca
|
||||
orcid: https://orcid.org/0000-0003-4315-6788
|
||||
- family-names: Waggoner
|
||||
given-names: Philip
|
||||
email: philip.waggoner@gmail.com
|
||||
|
|
@ -659,7 +675,7 @@ references:
|
|||
authors:
|
||||
- family-names: Wickham
|
||||
given-names: Hadley
|
||||
email: h.wickham@gmail.com
|
||||
email: hadley@posit.co
|
||||
year: '2025'
|
||||
doi: 10.32614/CRAN.package.reshape2
|
||||
- type: software
|
||||
|
|
@ -999,6 +1015,9 @@ references:
|
|||
- family-names: Lenth
|
||||
given-names: Russell V.
|
||||
email: russell-lenth@uiowa.edu
|
||||
- family-names: Piaskowski
|
||||
given-names: Julia
|
||||
email: julia.piask@gmail.com
|
||||
year: '2025'
|
||||
doi: 10.32614/CRAN.package.emmeans
|
||||
- type: software
|
||||
|
|
@ -1063,6 +1082,127 @@ references:
|
|||
orcid: https://orcid.org/0000-0002-7559-1154
|
||||
year: '2025'
|
||||
doi: 10.32614/CRAN.package.stRoke
|
||||
- type: software
|
||||
title: data.table
|
||||
abstract: 'data.table: Extension of `data.frame`'
|
||||
notes: Imports
|
||||
url: https://r-datatable.com
|
||||
repository: https://CRAN.R-project.org/package=data.table
|
||||
authors:
|
||||
- family-names: Barrett
|
||||
given-names: Tyson
|
||||
email: t.barrett88@gmail.com
|
||||
orcid: https://orcid.org/0000-0002-2137-1391
|
||||
- family-names: Dowle
|
||||
given-names: Matt
|
||||
email: mattjdowle@gmail.com
|
||||
- family-names: Srinivasan
|
||||
given-names: Arun
|
||||
email: asrini@pm.me
|
||||
- family-names: Gorecki
|
||||
given-names: Jan
|
||||
- family-names: Chirico
|
||||
given-names: Michael
|
||||
orcid: https://orcid.org/0000-0003-0787-087X
|
||||
- family-names: Hocking
|
||||
given-names: Toby
|
||||
orcid: https://orcid.org/0000-0002-3146-0865
|
||||
- family-names: Schwendinger
|
||||
given-names: Benjamin
|
||||
orcid: https://orcid.org/0000-0003-3315-8114
|
||||
- family-names: Krylov
|
||||
given-names: Ivan
|
||||
email: ikrylov@disroot.org
|
||||
orcid: https://orcid.org/0000-0002-0172-3812
|
||||
year: '2025'
|
||||
doi: 10.32614/CRAN.package.data.table
|
||||
- type: software
|
||||
title: viridis
|
||||
abstract: 'viridis: Colorblind-Friendly Color Maps for R'
|
||||
notes: Imports
|
||||
url: https://sjmgarnier.github.io/viridis/
|
||||
repository: https://CRAN.R-project.org/package=viridis
|
||||
authors:
|
||||
- family-names: Garnier
|
||||
given-names: Simon
|
||||
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'
|
||||
|
|
@ -1077,6 +1217,10 @@ references:
|
|||
- family-names: Walthert
|
||||
given-names: Lorenz
|
||||
email: lorenz.walthert@icloud.com
|
||||
- family-names: Patil
|
||||
given-names: Indrajeet
|
||||
email: patilindrajeet.science@gmail.com
|
||||
orcid: https://orcid.org/0000-0003-1995-6531
|
||||
year: '2025'
|
||||
doi: 10.32614/CRAN.package.styler
|
||||
- type: software
|
||||
|
|
@ -1094,7 +1238,7 @@ references:
|
|||
given-names: Winston
|
||||
- family-names: Bryan
|
||||
given-names: Jennifer
|
||||
email: jenny@rstudio.com
|
||||
email: jenny@posit.co
|
||||
orcid: https://orcid.org/0000-0002-6983-2759
|
||||
year: '2025'
|
||||
doi: 10.32614/CRAN.package.devtools
|
||||
|
|
|
|||
15
DESCRIPTION
15
DESCRIPTION
|
|
@ -1,6 +1,6 @@
|
|||
Package: FreesearchR
|
||||
Title: Easy data analysis for clinicians
|
||||
Version: 25.10.3
|
||||
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")),
|
||||
|
|
@ -11,7 +11,7 @@ Description: Easily evaluate and analyse clinical health data in your browser, e
|
|||
License: AGPL (>= 3)
|
||||
Encoding: UTF-8
|
||||
Roxygen: list(markdown = TRUE)
|
||||
RoxygenNote: 7.3.2
|
||||
RoxygenNote: 7.3.3
|
||||
Imports:
|
||||
assertthat,
|
||||
bslib,
|
||||
|
|
@ -68,7 +68,10 @@ Imports:
|
|||
readxl,
|
||||
NHANES,
|
||||
shiny.i18n,
|
||||
stRoke
|
||||
stRoke,
|
||||
data.table,
|
||||
viridis,
|
||||
smd
|
||||
Suggests:
|
||||
styler,
|
||||
devtools,
|
||||
|
|
@ -99,7 +102,8 @@ Collate:
|
|||
'correlations-module.R'
|
||||
'create-column-mod.R'
|
||||
'custom_SelectInput.R'
|
||||
'cut-variable-dates.R'
|
||||
'cut-variable-ext.R'
|
||||
'cut_var.R'
|
||||
'data-summary.R'
|
||||
'data_plots.R'
|
||||
'datagrid-infos-mod.R'
|
||||
|
|
@ -111,6 +115,7 @@ Collate:
|
|||
'launch_FreesearchR.R'
|
||||
'missings-module.R'
|
||||
'plot-download-module.R'
|
||||
'plot_bar.R'
|
||||
'plot_box.R'
|
||||
'plot_euler.R'
|
||||
'plot_hbar.R'
|
||||
|
|
@ -124,7 +129,9 @@ Collate:
|
|||
'regression_plot.R'
|
||||
'regression_table.R'
|
||||
'report.R'
|
||||
'separate_string.R'
|
||||
'syntax_highlight.R'
|
||||
'table-download-module.R'
|
||||
'theme.R'
|
||||
'translate.R'
|
||||
'ui_elements.R'
|
||||
|
|
|
|||
17
NAMESPACE
17
NAMESPACE
|
|
@ -1,6 +1,8 @@
|
|||
# Generated by roxygen2: do not edit by hand
|
||||
|
||||
S3method(cut_var,character)
|
||||
S3method(cut_var,default)
|
||||
S3method(cut_var,factor)
|
||||
S3method(cut_var,hms)
|
||||
S3method(plot,tbl_regression)
|
||||
export(FreesearchR_palette)
|
||||
|
|
@ -8,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)
|
||||
|
|
@ -28,6 +31,7 @@ export(create_log_tics)
|
|||
export(create_overview_datagrid)
|
||||
export(create_plot)
|
||||
export(custom_theme)
|
||||
export(cut_methods)
|
||||
export(cut_var)
|
||||
export(cut_variable_server)
|
||||
export(cut_variable_ui)
|
||||
|
|
@ -46,14 +50,17 @@ export(data_visuals_server)
|
|||
export(data_visuals_ui)
|
||||
export(default_format_arguments)
|
||||
export(default_parsing)
|
||||
export(detect_delimiter)
|
||||
export(drop_empty_event)
|
||||
export(expression_string)
|
||||
export(factor_new_levels_labels)
|
||||
export(factorize)
|
||||
export(file_export)
|
||||
export(format_writer)
|
||||
export(get_data_packages)
|
||||
export(get_fun_options)
|
||||
export(get_label)
|
||||
export(get_list_elements)
|
||||
export(get_plot_options)
|
||||
export(get_var_icon)
|
||||
export(getfun)
|
||||
|
|
@ -75,13 +82,13 @@ export(is_any_class)
|
|||
export(is_consecutive)
|
||||
export(is_datetime)
|
||||
export(is_identical_to_previous)
|
||||
export(is_splittable)
|
||||
export(is_valid_redcap_url)
|
||||
export(is_valid_token)
|
||||
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)
|
||||
|
|
@ -92,14 +99,18 @@ export(merge_expression)
|
|||
export(merge_long)
|
||||
export(missing_fraction)
|
||||
export(missings_apex_plot)
|
||||
export(missings_logic_across)
|
||||
export(missings_validate)
|
||||
export(modal_create_column)
|
||||
export(modal_cut_variable)
|
||||
export(modal_string_split)
|
||||
export(modal_update_factor)
|
||||
export(modal_visual_summary)
|
||||
export(modify_qmd)
|
||||
export(names2val)
|
||||
export(overview_vars)
|
||||
export(pipe_string)
|
||||
export(plot_bar_single)
|
||||
export(plot_box)
|
||||
export(plot_box_single)
|
||||
export(plot_euler)
|
||||
|
|
@ -125,11 +136,14 @@ export(remove_nested_list)
|
|||
export(repeated_instruments)
|
||||
export(sankey_ready)
|
||||
export(selectInputIcon)
|
||||
export(separate_string)
|
||||
export(set_column_label)
|
||||
export(show_data)
|
||||
export(simple_snake)
|
||||
export(sort_by)
|
||||
export(specify_qmd_format)
|
||||
export(string_split_server)
|
||||
export(string_split_ui)
|
||||
export(subset_types)
|
||||
export(supported_functions)
|
||||
export(supported_plots)
|
||||
|
|
@ -137,6 +151,7 @@ export(symmetrical_scale_x_log10)
|
|||
export(tbl_merge)
|
||||
export(type_icons)
|
||||
export(ui_elements)
|
||||
export(unique_names)
|
||||
export(unique_short)
|
||||
export(update_factor_server)
|
||||
export(update_factor_ui)
|
||||
|
|
|
|||
58
NEWS.md
58
NEWS.md
|
|
@ -1,3 +1,61 @@
|
|||
# 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
|
||||
|
||||
# FreesearchR 25.12.3
|
||||
|
||||
*NEW* Extended missingness evaluation to include two different approaches. Docs will catch up and video tutorials are coming.
|
||||
|
||||
# FreesearchR 25.12.2
|
||||
|
||||
*FIX* Fixed hanging interface when splitting strings.
|
||||
|
||||
*NEW* New option to shorten character variables to the first N words or characters. Shortening by characters could be useful working with eg. ICD-10 diagnostic codes.
|
||||
|
||||
# FreesearchR 25.12.1
|
||||
|
||||
*NEW* Option to edit factor label names in the "New factor" pop-up. This allows for easier naming for tables, but also to combine levels. A new variable is appended to the dataset if label names are changed. Code is now also exported.
|
||||
|
||||
*FIX* Fixes a bug, where white space in code exported was removed. Now a little too many spaces are included. Fine tuning continues.
|
||||
|
||||
*NEW* Easily copy code by just clicking "copy" in code blocks.
|
||||
|
||||
# FreesearchR 25.11.2
|
||||
|
||||
*NEW* Vignettes were moved to the [FreesearchR project knowledge base](https://freesearchr.github.io/FreesearchR-knowledge/). This was mainly to ease rendering and allow quick and easy updates as well as future translations.
|
||||
|
||||
# FreesearchR 25.11.1
|
||||
|
||||
*NEW* Added option to select extensive baseline table selecting between "Minimal" (current) or "Extensive" which adds mean/sd and min/max as well as plots all levels also for dichotomous variables.
|
||||
|
||||
# FreesearchR 25.10.5
|
||||
|
||||
*NEW* New character/text split function available. A selection of delimiters are recognised and selectable. Function only available if splittable variables are present.
|
||||
|
||||
*NEW* Distribution plotting for factors have been much improved including two new bar plot styles and removing options better suited for continuous data.
|
||||
|
||||
These were the last major functions to be implemented after workshops at Jitimai in Zanzibar City, Zanzibar during October 2025.
|
||||
|
||||
# FreesearchR 25.10.4
|
||||
|
||||
*NEW* Two new options to create new simplified factors from factors. The "top" option will keep only the top N levels, while the "bottom" option will combine all levels occurring below set percentage.
|
||||
|
||||
*NEW* The "New factor" function received some updates to include detailed information on the methods for creating new factors.
|
||||
|
||||
*LANGUAGE* Updated Swahili strings. All Danish strings are translated. New languages are on track.
|
||||
|
||||
# FreesearchR 25.10.3
|
||||
|
||||
*NEW* Improvements to translations with more strings having been translated. Nearing completion of marking strings for translation, which means (almost) the complete interface is now translatable.
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
app_version <- function()'25.10.3'
|
||||
app_version <- function()'25.12.6'
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#' mtcars |> baseline_table()
|
||||
#' mtcars |> baseline_table(fun.args = list(by = "gear"))
|
||||
baseline_table <- function(data, fun.args = NULL, fun = gtsummary::tbl_summary, vars = NULL) {
|
||||
|
||||
out <- do.call(fun, c(list(data = data), fun.args))
|
||||
return(out)
|
||||
}
|
||||
|
|
@ -23,19 +22,26 @@ baseline_table <- function(data, fun.args = NULL, fun = gtsummary::tbl_summary,
|
|||
#'
|
||||
#' @param data data
|
||||
#' @param ... passed as fun.arg to baseline_table()
|
||||
#' @param strat.var grouping/strat variable
|
||||
#' @param add.p add comparison/p-value
|
||||
#' @param add.overall add overall column
|
||||
#' @param by.var specify stratification variable
|
||||
#' @param theme set table theme
|
||||
#' @param detail_level specify detail level. Either "minimal" or "extended".
|
||||
#'
|
||||
#' @returns gtsummary table list object
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' mtcars |> create_baseline(by.var = "gear", add.p = "yes" == "yes")
|
||||
#' mtcars |> create_baseline(by.var = "gear", detail_level = "extended")
|
||||
#' 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")) {
|
||||
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)
|
||||
|
||||
if (by.var == "none" | !by.var %in% names(data)) {
|
||||
by.var <- NULL
|
||||
}
|
||||
|
|
@ -53,11 +59,32 @@ create_baseline <- function(data, ..., by.var, add.p = FALSE, add.overall = FALS
|
|||
|
||||
args <- list(...)
|
||||
|
||||
# browser()
|
||||
|
||||
if (!any(hasName(args, c("type", "statistic")))) {
|
||||
if (detail_level == "extended") {
|
||||
args <-
|
||||
modifyList(
|
||||
args,
|
||||
list(
|
||||
type = list(gtsummary::all_continuous() ~ "continuous2",
|
||||
gtsummary::all_dichotomous() ~ "categorical"),
|
||||
statistic = list(gtsummary::all_continuous() ~ c(
|
||||
"{median} ({p25}, {p75})",
|
||||
"{mean} ({sd})",
|
||||
"{min}, {max}"))
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
parameters <- list(
|
||||
data = data,
|
||||
fun.args = list(by = by.var, ...)
|
||||
fun.args = purrr::list_flatten(list(by = by.var, args))
|
||||
)
|
||||
|
||||
|
||||
# browser()
|
||||
out <- do.call(
|
||||
baseline_table,
|
||||
parameters
|
||||
|
|
@ -73,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,38 +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")
|
||||
),
|
||||
# tags$head(
|
||||
# # Note the wrapping of the string in HTML()
|
||||
# tags$style(HTML("
|
||||
# /* modified from esquisse for data types */
|
||||
# .btn-column-categorical {
|
||||
# background-color: #EF562D;
|
||||
# color: #FFFFFF;
|
||||
# }
|
||||
# .btn-column-continuous {
|
||||
# background-color: #0C4C8A;
|
||||
# color: #FFFFFF;
|
||||
# }
|
||||
# .btn-column-dichotomous {
|
||||
# background-color: #97D5E0;
|
||||
# color: #FFFFFF;
|
||||
# }
|
||||
# .btn-column-datetime {
|
||||
# background-color: #97D5E0;
|
||||
# color: #FFFFFF;
|
||||
# }
|
||||
# .btn-column-id {
|
||||
# background-color: #848484;
|
||||
# color: #FFFFFF;
|
||||
# }
|
||||
# .btn-column-text {
|
||||
# background-color: #2E2E2E;
|
||||
# color: #FFFFFF;
|
||||
# }"))
|
||||
# ),
|
||||
shiny::tags$head(
|
||||
shiny::tags$link(rel = "stylesheet", type = "text/css", href = "FreesearchR/inst/assets/css/FreesearchR.css")
|
||||
),
|
||||
fluidRow(
|
||||
column(
|
||||
width = 6,
|
||||
|
|
@ -213,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
|
||||
|
|
|
|||
|
|
@ -20,8 +20,18 @@
|
|||
#' @importFrom shiny selectizeInput
|
||||
#' @export
|
||||
#'
|
||||
columnSelectInput <- function(inputId, label, data, selected = "", ...,
|
||||
col_subset = NULL, placeholder = "", onInitialize, none_label="No variable selected",maxItems=NULL) {
|
||||
columnSelectInput <- function(
|
||||
inputId,
|
||||
label,
|
||||
data,
|
||||
selected = "",
|
||||
...,
|
||||
col_subset = NULL,
|
||||
placeholder = "",
|
||||
onInitialize,
|
||||
none_label = "No variable selected",
|
||||
maxItems = NULL
|
||||
) {
|
||||
datar <- if (is.reactive(data)) data else reactive(data)
|
||||
col_subsetr <- if (is.reactive(col_subset)) col_subset else reactive(col_subset)
|
||||
|
||||
|
|
@ -41,8 +51,8 @@ columnSelectInput <- function(inputId, label, data, selected = "", ...,
|
|||
)
|
||||
}, col = names(datar()))
|
||||
|
||||
if (!"none" %in% names(datar())){
|
||||
labels <- c("none"=list(sprintf('\n {\n \"name\": \"none\",\n \"label\": \"%s\",\n \"dataclass\": \"\",\n \"datatype\": \"\"\n }',none_label)),labels)
|
||||
if (!"none" %in% names(datar())) {
|
||||
labels <- c("none" = list(sprintf('\n {\n \"name\": \"none\",\n \"label\": \"%s\",\n \"dataclass\": \"\",\n \"datatype\": \"\"\n }', none_label)), labels)
|
||||
choices <- setNames(names(labels), labels)
|
||||
choices <- choices[match(if (length(col_subsetr()) == 0 || isTRUE(col_subsetr() == "")) names(datar()) else col_subsetr(), choices)]
|
||||
} else {
|
||||
|
|
@ -86,7 +96,7 @@ columnSelectInput <- function(inputId, label, data, selected = "", ...,
|
|||
'</div>';
|
||||
}
|
||||
}")),
|
||||
if (!is.null(maxItems)) list(maxItems=maxItems)
|
||||
if (!is.null(maxItems)) list(maxItems = maxItems)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
@ -107,31 +117,31 @@ columnSelectInput <- function(inputId, label, data, selected = "", ...,
|
|||
#'
|
||||
#' @examples
|
||||
#' if (shiny::interactive()) {
|
||||
#' shinyApp(
|
||||
#' ui = fluidPage(
|
||||
#' shiny::uiOutput("select"),
|
||||
#' tableOutput("data")
|
||||
#' ),
|
||||
#' server = function(input, output) {
|
||||
#' output$select <- shiny::renderUI({
|
||||
#' vectorSelectInput(
|
||||
#' inputId = "variable", label = "Variable:",
|
||||
#' data = c(
|
||||
#' "Cylinders" = "cyl",
|
||||
#' "Transmission" = "am",
|
||||
#' "Gears" = "gear"
|
||||
#' shinyApp(
|
||||
#' ui = fluidPage(
|
||||
#' shiny::uiOutput("select"),
|
||||
#' tableOutput("data")
|
||||
#' ),
|
||||
#' server = function(input, output) {
|
||||
#' output$select <- shiny::renderUI({
|
||||
#' vectorSelectInput(
|
||||
#' inputId = "variable", label = "Variable:",
|
||||
#' data = c(
|
||||
#' "Cylinders" = "cyl",
|
||||
#' "Transmission" = "am",
|
||||
#' "Gears" = "gear"
|
||||
#' )
|
||||
#' )
|
||||
#' )
|
||||
#' })
|
||||
#' })
|
||||
#'
|
||||
#' output$data <- renderTable(
|
||||
#' {
|
||||
#' mtcars[, c("mpg", input$variable), drop = FALSE]
|
||||
#' },
|
||||
#' rownames = TRUE
|
||||
#' )
|
||||
#' }
|
||||
#' )
|
||||
#' output$data <- renderTable(
|
||||
#' {
|
||||
#' mtcars[, c("mpg", input$variable), drop = FALSE]
|
||||
#' },
|
||||
#' rownames = TRUE
|
||||
#' )
|
||||
#' }
|
||||
#' )
|
||||
#' }
|
||||
vectorSelectInput <- function(inputId,
|
||||
label,
|
||||
|
|
@ -184,5 +194,3 @@ vectorSelectInput <- function(inputId,
|
|||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,188 +1,3 @@
|
|||
#' Extended cutting function with fall-back to the native base::cut
|
||||
#'
|
||||
#' @param x an object inheriting from class "hms"
|
||||
#' @param ... passed on
|
||||
#'
|
||||
#' @export
|
||||
#' @name cut_var
|
||||
cut_var <- function(x, ...) {
|
||||
UseMethod("cut_var")
|
||||
}
|
||||
|
||||
#' @export
|
||||
#' @name cut_var
|
||||
cut_var.default <- function(x, ...) {
|
||||
base::cut(x, ...)
|
||||
}
|
||||
|
||||
#' @name cut_var
|
||||
#'
|
||||
#' @return factor
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' readr::parse_time(c("01:00:20", "03:00:20", "01:20:20", "08:20:20", "21:20:20", "03:02:20")) |> cut_var(2)
|
||||
#' readr::parse_time(c("01:00:20", "03:00:20", "01:20:20", "08:20:20", "21:20:20", "03:02:20")) |> cut_var("min")
|
||||
#' readr::parse_time(c("01:00:20", "03:00:20", "01:20:20", "08:20:20", "21:20:20", "03:02:20")) |> cut_var(breaks = "hour")
|
||||
#' readr::parse_time(c("01:00:20", "03:00:20", "01:20:20", "08:20:20", "21:20:20", "03:02:20")) |> cut_var(breaks = hms::as_hms(c("01:00:00", "03:01:20", "9:20:20")))
|
||||
#' d_t <- readr::parse_time(c("01:00:20", "03:00:20", "01:20:20", "03:02:20", NA))
|
||||
#' f <- d_t |> cut_var(2)
|
||||
#' readr::parse_time(c("01:00:20", "03:00:20", "01:20:20", "03:02:20", NA)) |> cut_var(breaks = lubridate::as_datetime(c(hms::as_hms(levels(f)), hms::as_hms(max(d_t, na.rm = TRUE) + 1))), right = FALSE)
|
||||
cut_var.hms <- function(x, breaks, ...) {
|
||||
## as_hms keeps returning warnings on tz(); ignored
|
||||
suppressWarnings({
|
||||
if (hms::is_hms(breaks)) {
|
||||
breaks <- lubridate::as_datetime(breaks)
|
||||
}
|
||||
x <- lubridate::as_datetime(x)
|
||||
out <- cut_var.POSIXt(x, breaks = breaks, ...)
|
||||
attr(out, which = "brks") <- hms::as_hms(lubridate::as_datetime(attr(out, which = "brks")))
|
||||
attr(out, which = "levels") <- as.character(hms::as_hms(lubridate::as_datetime(attr(out, which = "levels"))))
|
||||
})
|
||||
out
|
||||
}
|
||||
|
||||
#' @name cut_var
|
||||
#' @param x an object inheriting from class "POSIXt" or "Date"
|
||||
#'
|
||||
#' @examples
|
||||
#' readr::parse_datetime(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(2)
|
||||
#' readr::parse_datetime(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(breaks = "weekday")
|
||||
#' readr::parse_datetime(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(breaks = "month_only")
|
||||
#' readr::parse_datetime(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(breaks=NULL,format = "%A-%H")
|
||||
#' readr::parse_datetime(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(breaks=NULL,format = "%W")
|
||||
cut_var.POSIXt <- function(x, breaks, right = FALSE, include.lowest = TRUE, start.on.monday = TRUE, ...) {
|
||||
breaks_o <- breaks
|
||||
args <- list(...)
|
||||
# browser()
|
||||
if (is.numeric(breaks)) {
|
||||
breaks <- quantile(
|
||||
x,
|
||||
probs = seq(0, 1, 1 / breaks),
|
||||
right = right,
|
||||
include.lowest = include.lowest,
|
||||
na.rm = TRUE
|
||||
)
|
||||
}
|
||||
|
||||
if ("format" %in% names(args)){
|
||||
assertthat::assert_that(is.character(args$format))
|
||||
out <- forcats::as_factor(format(x,format=args$format))
|
||||
} else if (identical(breaks, "weekday")) {
|
||||
## This is
|
||||
ds <- as.Date(1:7) |>
|
||||
(\(.x){
|
||||
sort_by(format(.x,"%A"),as.numeric(format(.x,"%w")))
|
||||
})()
|
||||
|
||||
if (start.on.monday) {
|
||||
ds <- ds[c(7, 1:6)]
|
||||
}
|
||||
out <- factor(weekdays(x), levels = ds) |> forcats::fct_drop()
|
||||
} else if (identical(breaks, "month_only")) {
|
||||
## Simplest way to create a vector of all months in order
|
||||
## which will also follow the locale of the machine
|
||||
ms <- paste0("1970-", 1:12, "-01") |>
|
||||
as.Date() |>
|
||||
months()
|
||||
|
||||
out <- factor(months(x), levels = ms) |> forcats::fct_drop()
|
||||
} else {
|
||||
## Doesn't really work very well for breaks other than the special character cases as right border is excluded
|
||||
out <- base::cut.POSIXt(x, breaks = breaks, right = right, ...) |> forcats::fct_drop()
|
||||
# browser()
|
||||
}
|
||||
l <- levels(out)
|
||||
if (is.numeric(breaks_o)) {
|
||||
l <- breaks
|
||||
} else if (is.character(breaks) && length(breaks) == 1 && !(identical(breaks, "weekday") | identical(breaks, "month_only"))) {
|
||||
if (include.lowest) {
|
||||
if (right) {
|
||||
l <- c(l, min(as.character(x)))
|
||||
} else {
|
||||
l <- c(l, max(as.character(x)))
|
||||
}
|
||||
}
|
||||
} else if (length(l) < length(breaks_o)) {
|
||||
l <- breaks_o
|
||||
}
|
||||
|
||||
attr(out, which = "brks") <- l
|
||||
out
|
||||
}
|
||||
|
||||
#' @name cut_var
|
||||
#' @param x an object inheriting from class "POSIXct"
|
||||
cut_var.POSIXct <- cut_var.POSIXt
|
||||
|
||||
#' @name cut_var
|
||||
#' @param x an object inheriting from class "POSIXct"
|
||||
#'
|
||||
#' @examples
|
||||
#' as.Date(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(2)
|
||||
#' as.Date(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(breaks = "weekday")
|
||||
#' as.Date(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(format = "%W")
|
||||
cut_var.Date <- function(x, breaks=NULL, start.on.monday = TRUE, ...) {
|
||||
args <- list(...)
|
||||
|
||||
if ("format" %in% names(args)){
|
||||
assertthat::assert_that(is.character(args$format))
|
||||
out <- forcats::as_factor(format(x,format=args$format))
|
||||
} else if (identical(breaks, "weekday")) {
|
||||
ds <- as.Date(1:7) |>
|
||||
(\(.x){
|
||||
sort_by(format(.x,"%A"),as.numeric(format(.x,"%w")))
|
||||
})()
|
||||
|
||||
if (start.on.monday) {
|
||||
ds <- ds[c(7, 1:6)]
|
||||
}
|
||||
out <- factor(weekdays(x), levels = ds) |> forcats::fct_drop()
|
||||
} else if (identical(breaks, "month_only")) {
|
||||
ms <- paste0("1970-", 1:12, "-01") |>
|
||||
as.Date() |>
|
||||
months()
|
||||
|
||||
out <- factor(months(x), levels = ms) |> forcats::fct_drop()
|
||||
} else {
|
||||
## Doesn't really work very well for breaks other than the special character cases as right border is excluded
|
||||
out <- base::cut.Date(x, breaks = breaks, ...) |> forcats::fct_drop()
|
||||
# browser()
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
#' Test class
|
||||
#'
|
||||
#' @param data data
|
||||
#' @param class.vec vector of class names to test
|
||||
#'
|
||||
#' @return factor
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' \dontrun{
|
||||
#' vapply(REDCapCAST::redcapcast_data, \(.x){
|
||||
#' is_any_class(.x, c("hms", "Date", "POSIXct", "POSIXt"))
|
||||
#' }, logical(1))
|
||||
#' }
|
||||
is_any_class <- function(data, class.vec) {
|
||||
any(class(data) %in% class.vec)
|
||||
}
|
||||
|
||||
#' Test is date/datetime/time
|
||||
#'
|
||||
#' @param data data
|
||||
#'
|
||||
#' @return factor
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' vapply(REDCapCAST::redcapcast_data, is_datetime, logical(1))
|
||||
is_datetime <- function(data) {
|
||||
is_any_class(data, class.vec = c("hms", "Date", "POSIXct", "POSIXt"))
|
||||
}
|
||||
|
||||
#' @title Module to Convert Numeric to Factor
|
||||
#'
|
||||
#' @description
|
||||
|
|
@ -206,12 +21,13 @@ cut_variable_ui <- function(id) {
|
|||
shiny::fluidRow(
|
||||
column(
|
||||
width = 3,
|
||||
shinyWidgets::virtualSelectInput(
|
||||
inputId = ns("variable"),
|
||||
label = i18n$t("Variable to cut:"),
|
||||
choices = NULL,
|
||||
width = "100%"
|
||||
)
|
||||
shiny::uiOutput(outputId = ns("variable"))
|
||||
# shinyWidgets::virtualSelectInput(
|
||||
# inputId = ns("variable"),
|
||||
# label = i18n$t("Variable to cut:"),
|
||||
# choices = NULL,
|
||||
# width = "100%"
|
||||
# )
|
||||
),
|
||||
column(
|
||||
width = 3,
|
||||
|
|
@ -219,26 +35,23 @@ cut_variable_ui <- function(id) {
|
|||
),
|
||||
column(
|
||||
width = 3,
|
||||
numericInput(
|
||||
inputId = ns("n_breaks"),
|
||||
label = i18n$t("Number of breaks:"),
|
||||
value = 3,
|
||||
min = 2,
|
||||
max = 12,
|
||||
width = "100%"
|
||||
)
|
||||
shiny::uiOutput(ns("n_breaks"))
|
||||
),
|
||||
column(
|
||||
width = 3,
|
||||
checkboxInput(
|
||||
inputId = ns("right"),
|
||||
label = i18n$t("Close intervals on the right"),
|
||||
value = TRUE
|
||||
),
|
||||
checkboxInput(
|
||||
inputId = ns("include_lowest"),
|
||||
label = i18n$t("Include lowest value"),
|
||||
value = TRUE
|
||||
shiny::conditionalPanel(
|
||||
condition = "input.method != 'top' && input.method != 'bottom' && input.method != 'words' && input.method != 'characters'",
|
||||
ns = ns,
|
||||
checkboxInput(
|
||||
inputId = ns("right"),
|
||||
label = i18n$t("Close intervals on the right"),
|
||||
value = TRUE
|
||||
),
|
||||
checkboxInput(
|
||||
inputId = ns("include_lowest"),
|
||||
label = i18n$t("Include lowest value"),
|
||||
value = TRUE
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
|
@ -275,26 +88,70 @@ cut_variable_server <- function(id, data_r = reactive(NULL)) {
|
|||
function(input, output, session) {
|
||||
rv <- reactiveValues(data = NULL, new_var_name = NULL)
|
||||
|
||||
ns <- session$ns
|
||||
|
||||
bindEvent(observe({
|
||||
data <- data_r()
|
||||
rv$data <- data
|
||||
vars_num <- vapply(data, \(.x){
|
||||
is.numeric(.x) || is_datetime(.x)
|
||||
is.numeric(.x) || is_datetime(.x) || (is.factor(.x) && length(levels(.x)) > 2) || is.character(.x)
|
||||
}, logical(1))
|
||||
vars_num <- names(vars_num)[vars_num]
|
||||
shinyWidgets::updateVirtualSelect(
|
||||
inputId = "variable",
|
||||
choices = vars_num,
|
||||
selected = if (isTruthy(input$variable)) input$variable else vars_num[1]
|
||||
|
||||
output$variable <- shiny::renderUI(
|
||||
columnSelectInput(
|
||||
inputId = ns("variable"),
|
||||
data = data,
|
||||
label = i18n$t("Variable to cut:"),
|
||||
width = "100%",
|
||||
col_subset = vars_num,
|
||||
selected = if (isTruthy(input$variable)) input$variable else vars_num[1]
|
||||
)
|
||||
)
|
||||
|
||||
# shinyWidgets::updateVirtualSelect(
|
||||
# inputId = "variable",
|
||||
# choices = vars_num,
|
||||
# selected = if (isTruthy(input$variable)) input$variable else vars_num[1]
|
||||
# )
|
||||
}), data_r(), input$hidden)
|
||||
|
||||
output$n_breaks <- shiny::renderUI({
|
||||
req(input$method)
|
||||
# req(!is.null(get_list_elements(name = input$cut_method,element = "breaks")))
|
||||
# browser()
|
||||
|
||||
break_text <- get_list_elements(name = input$method, element = "breaks")
|
||||
|
||||
if (is.null(get_list_elements(name = input$method, element = "min"))) {
|
||||
min <- 2
|
||||
} else {
|
||||
min <- get_list_elements(name = input$method, element = "min")
|
||||
}
|
||||
|
||||
if (is.null(get_list_elements(name = input$method, element = "max"))) {
|
||||
max <- 10
|
||||
} else {
|
||||
max <- get_list_elements(name = input$method, element = "max")
|
||||
}
|
||||
|
||||
numericInput(
|
||||
inputId = ns("n_breaks"),
|
||||
label = break_text,
|
||||
value = 3,
|
||||
min = min,
|
||||
max = max,
|
||||
width = "100%"
|
||||
)
|
||||
})
|
||||
|
||||
output$slider_fixed <- renderUI({
|
||||
data <- req(data_r())
|
||||
req(input$n_breaks)
|
||||
variable <- req(input$variable)
|
||||
req(hasName(data, variable))
|
||||
|
||||
if (is_datetime(data[[variable]])) {
|
||||
if (is_datetime(data[[variable]]) || is.factor(data[[variable]])) {
|
||||
brks <- cut_var(data[[variable]],
|
||||
breaks = input$n_breaks
|
||||
)$brks
|
||||
|
|
@ -339,7 +196,7 @@ cut_variable_server <- function(id, data_r = reactive(NULL)) {
|
|||
# "quantile"
|
||||
)
|
||||
|
||||
if (any(c("hms","POSIXct") %in% class(data[[variable]]))) {
|
||||
if (any(c("hms", "POSIXct") %in% class(data[[variable]]))) {
|
||||
choices <- c(choices, "hour")
|
||||
} else if (any(c("POSIXt", "Date") %in% class(data[[variable]]))) {
|
||||
choices <- c(
|
||||
|
|
@ -353,11 +210,23 @@ cut_variable_server <- function(id, data_r = reactive(NULL)) {
|
|||
"quarter",
|
||||
"year"
|
||||
)
|
||||
} else if ("factor" %in% class(data[[variable]])) {
|
||||
choices <- c(
|
||||
choices,
|
||||
"top",
|
||||
"bottom"
|
||||
)
|
||||
} else if ("character" %in% class(data[[variable]])) {
|
||||
choices <- c(
|
||||
choices,
|
||||
"characters",
|
||||
"words"
|
||||
)
|
||||
} else {
|
||||
choices <- c(
|
||||
choices,
|
||||
"fixed",
|
||||
"quantile",
|
||||
"quantile" # ,
|
||||
# "sd",
|
||||
# "equal",
|
||||
# "pretty",
|
||||
|
|
@ -366,7 +235,7 @@ cut_variable_server <- function(id, data_r = reactive(NULL)) {
|
|||
# "bclust",
|
||||
# "fisher",
|
||||
# "jenks",
|
||||
"headtails" # ,
|
||||
# "headtails" # ,
|
||||
# "maximum",
|
||||
# "box"
|
||||
)
|
||||
|
|
@ -374,10 +243,10 @@ cut_variable_server <- function(id, data_r = reactive(NULL)) {
|
|||
|
||||
choices <- unique(choices)
|
||||
|
||||
shinyWidgets::virtualSelectInput(
|
||||
inputId = session$ns("method"),
|
||||
vectorSelectInput(
|
||||
inputId = ns("method"),
|
||||
label = i18n$t("Method:"),
|
||||
choices = choices,
|
||||
choices = names2val(get_list_elements(choices, "descr", dict = cut_methods())),
|
||||
selected = NULL,
|
||||
width = "100%"
|
||||
)
|
||||
|
|
@ -429,16 +298,25 @@ cut_variable_server <- function(id, data_r = reactive(NULL)) {
|
|||
# cut.POSIXct <- cut.POSIXt
|
||||
f <- cut_var(data[[variable]], breaks = input$method)
|
||||
list(var = f, brks = levels(f))
|
||||
} else if (input$method %in% c(
|
||||
"top",
|
||||
"bottom",
|
||||
"characters",
|
||||
"words"
|
||||
)) {
|
||||
# This allows factor simplification to get the top or bottom count
|
||||
f <- cut_var(data[[variable]], breaks = input$n_breaks)
|
||||
list(var = f, brks = input$n_breaks, type = input$method)
|
||||
} else if (input$method %in% c("hour")) {
|
||||
# To enable datetime cutting
|
||||
# cut.POSIXct <- cut.POSIXt
|
||||
f <- cut_var(data[[variable]], breaks = "hour")
|
||||
list(var = f, brks = levels(f))
|
||||
# } else if (input$method %in% c("week_only")) {
|
||||
# # As a proof of concept a single option to use "format" parameter
|
||||
# # https://www.stat.berkeley.edu/~s133/dates.html
|
||||
# f <- cut_var(data[[variable]], format = "%W")
|
||||
# list(var = f, brks = levels(f))
|
||||
# } else if (input$method %in% c("week_only")) {
|
||||
# # As a proof of concept a single option to use "format" parameter
|
||||
# # https://www.stat.berkeley.edu/~s133/dates.html
|
||||
# f <- cut_var(data[[variable]], format = "%W")
|
||||
# list(var = f, brks = levels(f))
|
||||
} else {
|
||||
classInt::classIntervals(
|
||||
var = as.numeric(data[[variable]]),
|
||||
|
|
@ -462,7 +340,17 @@ cut_variable_server <- function(id, data_r = reactive(NULL)) {
|
|||
variable <- req(input$variable)
|
||||
|
||||
|
||||
if (input$method %in% c("day", "weekday", "week", "month", "month_only", "quarter", "year", "hour")) {
|
||||
if (input$method %in% c(
|
||||
"day",
|
||||
"weekday",
|
||||
"week",
|
||||
"month",
|
||||
"month_only",
|
||||
"quarter",
|
||||
"year",
|
||||
"hour"
|
||||
)
|
||||
) {
|
||||
breaks <- input$method
|
||||
} else {
|
||||
breaks <- breaks_r()$brks
|
||||
|
|
@ -475,47 +363,44 @@ cut_variable_server <- function(id, data_r = reactive(NULL)) {
|
|||
right = input$right
|
||||
)
|
||||
|
||||
if ("type" %in% names(breaks_r())) {
|
||||
parameters <- modifyList(
|
||||
parameters,
|
||||
list(
|
||||
type = breaks_r()$type,
|
||||
other = i18n$t("Other")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
new_variable <- tryCatch(
|
||||
{
|
||||
rlang::exec(cut_var, !!!parameters)
|
||||
},
|
||||
error = function(err) {
|
||||
showNotification(paste0("We encountered the following error creating your report: ", err), type = "err")
|
||||
showNotification(paste("We encountered the following error creating the new factor:", err), type = "err")
|
||||
}
|
||||
)
|
||||
|
||||
# new_variable <- do.call(
|
||||
# cut,
|
||||
# parameters
|
||||
# )
|
||||
data <- append_column(data,
|
||||
column = new_variable,
|
||||
name = unique_names(paste0(variable, "_cut"),
|
||||
existing = names(data)),
|
||||
index = "right")
|
||||
|
||||
|
||||
data <- append_column(data, column = new_variable, name = paste0(variable, "_cut"), index = "right")
|
||||
|
||||
# setNames(paste0(variable, "_cut"))
|
||||
#
|
||||
# data <- dplyr::bind_cols(data, new_variable, .name_repair = "unique_quiet")
|
||||
|
||||
# rv$new_var_name <- names(data)[length(data)]
|
||||
# browser()
|
||||
|
||||
# browser()
|
||||
code <- rlang::call2(
|
||||
"append_column",
|
||||
!!!list(
|
||||
column = rlang::call2("cut_var",
|
||||
!!!modifyList(parameters, list(x = as.symbol(paste0("data$", variable)))),
|
||||
.ns = "FreesearchR"),
|
||||
!!!modifyList(parameters, list(x = as.symbol(paste0("data$", variable)))),
|
||||
.ns = "FreesearchR"
|
||||
),
|
||||
name = paste0(variable, "_cut"), index = "right"
|
||||
),
|
||||
.ns = "FreesearchR"
|
||||
)
|
||||
attr(data, "code") <- code
|
||||
|
||||
# attr(data, "code") <- Reduce(
|
||||
# f = function(x, y) expr(!!x %>% !!y),
|
||||
# x = c(attr(data, "code"), code)
|
||||
# )
|
||||
data
|
||||
})
|
||||
|
||||
|
|
@ -523,6 +408,7 @@ cut_variable_server <- function(id, data_r = reactive(NULL)) {
|
|||
# shiny::req(rv$new_var_name)
|
||||
data <- req(data_cutted_r())
|
||||
# variable <- req(input$variable)
|
||||
|
||||
count_data <- as.data.frame(
|
||||
table(
|
||||
breaks = data[[length(data)]],
|
||||
|
|
@ -530,6 +416,7 @@ cut_variable_server <- function(id, data_r = reactive(NULL)) {
|
|||
),
|
||||
responseName = "count"
|
||||
)
|
||||
count_data$freq <- paste(signif(count_data$count / nrow(data) * 100, 3), "%")
|
||||
gridTheme <- getOption("datagrid.theme")
|
||||
if (length(gridTheme) < 1) {
|
||||
datamods:::apply_grid_theme()
|
||||
|
|
@ -537,7 +424,7 @@ cut_variable_server <- function(id, data_r = reactive(NULL)) {
|
|||
on.exit(toastui::reset_grid_theme())
|
||||
grid <- toastui::datagrid(
|
||||
data = count_data,
|
||||
colwidths = "guess",
|
||||
colwidths = "fit",
|
||||
theme = "default",
|
||||
bodyHeight = "auto"
|
||||
)
|
||||
|
|
@ -590,12 +477,14 @@ modal_cut_variable <- function(id,
|
|||
|
||||
|
||||
#' @importFrom graphics abline axis hist par plot.new plot.window
|
||||
plot_histogram <- function(data, column=NULL, bins = 30, breaks = NULL, color = "#112466") {
|
||||
if (is.vector(data)){
|
||||
plot_histogram <- function(data, column = NULL, bins = 30, breaks = NULL, color = "#112466") {
|
||||
if (is.vector(data)) {
|
||||
x <- data
|
||||
} else {
|
||||
x <- data[[column]]
|
||||
|
||||
x <- data[[column]]
|
||||
}
|
||||
if (is.character(x)){
|
||||
x <- REDCapCAST::as_factor(x)
|
||||
}
|
||||
x <- as.numeric(x)
|
||||
op <- par(mar = rep(1.5, 4))
|
||||
|
|
@ -611,3 +500,128 @@ plot_histogram <- function(data, column=NULL, bins = 30, breaks = NULL, color =
|
|||
abline(v = breaks, col = "#2E2E2E", lty = 2, lwd = 1.5)
|
||||
}
|
||||
|
||||
|
||||
#### Helpers
|
||||
####
|
||||
####
|
||||
|
||||
#' Library of cut methods with descriptions
|
||||
#'
|
||||
#' @returns vector
|
||||
#' @export
|
||||
#'
|
||||
cut_methods <- function() {
|
||||
list(
|
||||
"hour" = list(
|
||||
descr = i18n$t("Hour of the day"),
|
||||
# class = c("hms", "POSIXct"), # Not implemented yet, but will during rewrite at some point...
|
||||
breaks = NULL
|
||||
),
|
||||
"day" = list(
|
||||
descr = i18n$t("By day of the week"),
|
||||
breaks = NULL
|
||||
),
|
||||
"weekday" = list(
|
||||
descr = i18n$t("By weekday"),
|
||||
breaks = NULL
|
||||
),
|
||||
"week" = list(
|
||||
descr = i18n$t("By week number and year"),
|
||||
breaks = NULL
|
||||
),
|
||||
"week_only" = list(
|
||||
descr = i18n$t("By week number"),
|
||||
breaks = NULL
|
||||
),
|
||||
"month" = list(
|
||||
descr = i18n$t("By month and year"),
|
||||
breaks = NULL
|
||||
),
|
||||
"month_only" = list(
|
||||
descr = i18n$t("By month only"),
|
||||
breaks = NULL
|
||||
),
|
||||
"quarter" = list(
|
||||
descr = i18n$t("By quarter of the year"),
|
||||
breaks = NULL
|
||||
),
|
||||
"year" = list(
|
||||
descr = i18n$t("By year"),
|
||||
breaks = NULL
|
||||
),
|
||||
"top" = list(
|
||||
descr = i18n$t("Keep only most common"),
|
||||
breaks = i18n$t("Number"),
|
||||
min = 1,
|
||||
max = 20
|
||||
),
|
||||
"bottom" = list(
|
||||
descr = i18n$t("Combine below percentage"),
|
||||
breaks = i18n$t("Percentage"),
|
||||
min = 1,
|
||||
max = 50
|
||||
),
|
||||
"characters" = list(
|
||||
descr = i18n$t("Shorten to first letters"),
|
||||
breaks = i18n$t("Letters"),
|
||||
min = 1,
|
||||
max = 20
|
||||
),
|
||||
"words" = list(
|
||||
descr = i18n$t("Shorten to first words"),
|
||||
breaks = i18n$t("Words"),
|
||||
min = 1,
|
||||
max = 50
|
||||
),
|
||||
"fixed" = list(
|
||||
descr = i18n$t("By specified numbers"),
|
||||
breaks = i18n$t("Breaks"),
|
||||
min = 2,
|
||||
max = 12
|
||||
),
|
||||
"quantile" = list(
|
||||
descr = i18n$t("By quantiles (groups of equal size)"),
|
||||
breaks = i18n$t("Breaks"),
|
||||
min = 2,
|
||||
max = 10
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
#' Subset elements from list of lists
|
||||
#'
|
||||
#' @description
|
||||
#' General function to sub-setting details stored in list dictionaries.
|
||||
#'
|
||||
#'
|
||||
#' @param name list name to lookup
|
||||
#' @param element element to get
|
||||
#' @param dict dictionary to use
|
||||
#'
|
||||
#' @returns named vector
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' get_list_elements(c("top", "bottom"), "descr")
|
||||
get_list_elements <- function(name, element, dict = cut_methods()) {
|
||||
if (is.null(name)) {
|
||||
return(NULL)
|
||||
} else {
|
||||
sapply(dict[name], \(.x){
|
||||
.x[[element]]
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#' Set values as names and names as values
|
||||
#'
|
||||
#' @param data data
|
||||
#'
|
||||
#' @returns named vector
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' names2val(c("Cylinders" = "cyl", "Transmission" = "am", "Gears" = "gear"))
|
||||
names2val <- function(data) {
|
||||
setNames(names(data), data)
|
||||
}
|
||||
284
R/cut_var.R
Normal file
284
R/cut_var.R
Normal file
|
|
@ -0,0 +1,284 @@
|
|||
#' Extended cutting function with fall-back to the native base::cut
|
||||
#'
|
||||
#' @param x an object inheriting from class "hms"
|
||||
#' @param ... passed on
|
||||
#'
|
||||
#' @export
|
||||
#' @name cut_var
|
||||
cut_var <- function(x, ...) {
|
||||
UseMethod("cut_var")
|
||||
}
|
||||
|
||||
#' @export
|
||||
#' @name cut_var
|
||||
cut_var.default <- function(x, ...) {
|
||||
base::cut(x, ...)
|
||||
}
|
||||
|
||||
#' @name cut_var
|
||||
#'
|
||||
#' @return factor
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' readr::parse_time(c("01:00:20", "03:00:20", "01:20:20", "08:20:20", "21:20:20", "03:02:20")) |> cut_var(2)
|
||||
#' readr::parse_time(c("01:00:20", "03:00:20", "01:20:20", "08:20:20", "21:20:20", "03:02:20")) |> cut_var("min")
|
||||
#' readr::parse_time(c("01:00:20", "03:00:20", "01:20:20", "08:20:20", "21:20:20", "03:02:20")) |> cut_var(breaks = "hour")
|
||||
#' readr::parse_time(c("01:00:20", "03:00:20", "01:20:20", "08:20:20", "21:20:20", "03:02:20")) |> cut_var(breaks = hms::as_hms(c("01:00:00", "03:01:20", "9:20:20")))
|
||||
#' d_t <- readr::parse_time(c("01:00:20", "03:00:20", "01:20:20", "03:02:20", NA))
|
||||
#' f <- d_t |> cut_var(2)
|
||||
#' readr::parse_time(c("01:00:20", "03:00:20", "01:20:20", "03:02:20", NA)) |> cut_var(breaks = lubridate::as_datetime(c(hms::as_hms(levels(f)), hms::as_hms(max(d_t, na.rm = TRUE) + 1))), right = FALSE)
|
||||
cut_var.hms <- function(x, breaks, ...) {
|
||||
## as_hms keeps returning warnings on tz(); ignored
|
||||
suppressWarnings({
|
||||
if (hms::is_hms(breaks)) {
|
||||
breaks <- lubridate::as_datetime(breaks)
|
||||
}
|
||||
x <- lubridate::as_datetime(x)
|
||||
out <- cut_var.POSIXt(x, breaks = breaks, ...)
|
||||
attr(out, which = "brks") <- hms::as_hms(lubridate::as_datetime(attr(out, which = "brks")))
|
||||
attr(out, which = "levels") <- as.character(hms::as_hms(lubridate::as_datetime(attr(out, which = "levels"))))
|
||||
})
|
||||
out
|
||||
}
|
||||
|
||||
#' @name cut_var
|
||||
#' @param x an object inheriting from class "POSIXt" or "Date"
|
||||
#'
|
||||
#' @examples
|
||||
#' readr::parse_datetime(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(2)
|
||||
#' readr::parse_datetime(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(breaks = "weekday")
|
||||
#' readr::parse_datetime(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(breaks = "month_only")
|
||||
#' readr::parse_datetime(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(breaks = NULL, format = "%A-%H")
|
||||
#' readr::parse_datetime(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(breaks = NULL, format = "%W")
|
||||
cut_var.POSIXt <- function(x, breaks, right = FALSE, include.lowest = TRUE, start.on.monday = TRUE, ...) {
|
||||
breaks_o <- breaks
|
||||
args <- list(...)
|
||||
# browser()
|
||||
if (is.numeric(breaks)) {
|
||||
breaks <- quantile(
|
||||
x,
|
||||
probs = seq(0, 1, 1 / breaks),
|
||||
right = right,
|
||||
include.lowest = include.lowest,
|
||||
na.rm = TRUE
|
||||
)
|
||||
}
|
||||
|
||||
if ("format" %in% names(args)) {
|
||||
assertthat::assert_that(is.character(args$format))
|
||||
out <- forcats::as_factor(format(x, format = args$format))
|
||||
} else if (identical(breaks, "weekday")) {
|
||||
## This is
|
||||
ds <- as.Date(1:7) |>
|
||||
(\(.x){
|
||||
sort_by(format(.x, "%A"), as.numeric(format(.x, "%w")))
|
||||
})()
|
||||
|
||||
if (start.on.monday) {
|
||||
ds <- ds[c(7, 1:6)]
|
||||
}
|
||||
out <- factor(weekdays(x), levels = ds) |> forcats::fct_drop()
|
||||
} else if (identical(breaks, "month_only")) {
|
||||
## Simplest way to create a vector of all months in order
|
||||
## which will also follow the locale of the machine
|
||||
ms <- paste0("1970-", 1:12, "-01") |>
|
||||
as.Date() |>
|
||||
months()
|
||||
|
||||
out <- factor(months(x), levels = ms) |> forcats::fct_drop()
|
||||
} else {
|
||||
## Doesn't really work very well for breaks other than the special character cases as right border is excluded
|
||||
out <- base::cut.POSIXt(x, breaks = breaks, right = right, ...) |> forcats::fct_drop()
|
||||
# browser()
|
||||
}
|
||||
l <- levels(out)
|
||||
if (is.numeric(breaks_o)) {
|
||||
l <- breaks
|
||||
} else if (is.character(breaks) && length(breaks) == 1 && !(identical(breaks, "weekday") | identical(breaks, "month_only"))) {
|
||||
if (include.lowest) {
|
||||
if (right) {
|
||||
l <- c(l, min(as.character(x)))
|
||||
} else {
|
||||
l <- c(l, max(as.character(x)))
|
||||
}
|
||||
}
|
||||
} else if (length(l) < length(breaks_o)) {
|
||||
l <- breaks_o
|
||||
}
|
||||
|
||||
attr(out, which = "brks") <- l
|
||||
out
|
||||
}
|
||||
|
||||
#' @name cut_var
|
||||
#' @param x an object inheriting from class "POSIXct"
|
||||
cut_var.POSIXct <- cut_var.POSIXt
|
||||
|
||||
#' @name cut_var
|
||||
#' @param x an object inheriting from class "POSIXct"
|
||||
#'
|
||||
#' @examples
|
||||
#' as.Date(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(2)
|
||||
#' as.Date(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(breaks = "weekday")
|
||||
#' as.Date(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(format = "%W")
|
||||
cut_var.Date <- function(x, breaks = NULL, start.on.monday = TRUE, ...) {
|
||||
args <- list(...)
|
||||
|
||||
if ("format" %in% names(args)) {
|
||||
assertthat::assert_that(is.character(args$format))
|
||||
out <- forcats::as_factor(format(x, format = args$format))
|
||||
} else if (identical(breaks, "weekday")) {
|
||||
ds <- as.Date(1:7) |>
|
||||
(\(.x){
|
||||
sort_by(format(.x, "%A"), as.numeric(format(.x, "%w")))
|
||||
})()
|
||||
|
||||
if (start.on.monday) {
|
||||
ds <- ds[c(7, 1:6)]
|
||||
}
|
||||
out <- factor(weekdays(x), levels = ds) |> forcats::fct_drop()
|
||||
} else if (identical(breaks, "month_only")) {
|
||||
ms <- paste0("1970-", 1:12, "-01") |>
|
||||
as.Date() |>
|
||||
months()
|
||||
|
||||
out <- factor(months(x), levels = ms) |> forcats::fct_drop()
|
||||
} else {
|
||||
## Doesn't really work very well for breaks other than the special character cases as right border is excluded
|
||||
out <- base::cut.Date(x, breaks = breaks, ...) |> forcats::fct_drop()
|
||||
# browser()
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
|
||||
#' Simplify a factor to only the top or bottom n levels
|
||||
#'
|
||||
#' @param type
|
||||
#'
|
||||
#' @name cut_var
|
||||
#'
|
||||
#' @returns factor
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' mtcars$carb |>
|
||||
#' as.factor() |>
|
||||
#' cut_var(2) |>
|
||||
#' table()
|
||||
#'
|
||||
#' mtcars$carb |>
|
||||
#' as.factor() |>
|
||||
#' cut_var(20, "bottom") |>
|
||||
#' table()
|
||||
cut_var.factor <- function(x, breaks = NULL, type = c("top", "bottom"), other = "Other", ...) {
|
||||
args <- list(...)
|
||||
|
||||
if (is.null(breaks)) {
|
||||
return(x)
|
||||
}
|
||||
|
||||
type <- match.arg(type)
|
||||
|
||||
tbl <- sort(table(x), decreasing = TRUE)
|
||||
|
||||
if (type == "top") {
|
||||
if (length(levels(x)) <= breaks) {
|
||||
return(x)
|
||||
}
|
||||
lvls <- names(tbl[seq_len(breaks)])
|
||||
} else if (type == "bottom") {
|
||||
freqs_check <- tbl / NROW(x) * 100 < breaks
|
||||
if (!any(freqs_check)) {
|
||||
return(x)
|
||||
}
|
||||
lvls <- names(tbl)[!freqs_check]
|
||||
}
|
||||
|
||||
# if (other %in% lvls) {
|
||||
# other <- paste(other, "_freesearchr")
|
||||
# }
|
||||
|
||||
# Ensure unique new level name
|
||||
other <- unique_names(other, lvls)
|
||||
|
||||
## Relabel and relevel
|
||||
out <- forcats::fct_relabel(
|
||||
x,
|
||||
\(.x){
|
||||
ifelse(.x %in% lvls, .x, other)
|
||||
}
|
||||
) |>
|
||||
forcats::fct_relevel(lvls, other)
|
||||
|
||||
attr(out, which = "brks") <- breaks
|
||||
out
|
||||
}
|
||||
|
||||
|
||||
#' Subset first part of string to factor
|
||||
#'
|
||||
#' @name cut_var
|
||||
#'
|
||||
#' @returns factor
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' c("Sunday", "This week is short") |> cut_var(breaks = 3)
|
||||
cut_var.character <- function(x, breaks = NULL, type = c("characters", "words"), ...) {
|
||||
args <- list(...)
|
||||
|
||||
if (is.null(breaks)) {
|
||||
return(x)
|
||||
}
|
||||
|
||||
type <- match.arg(type)
|
||||
|
||||
if (type == "characters") {
|
||||
out <- substr(x, start = 1, stop = breaks)
|
||||
} else if (type == "words") {
|
||||
out <- strsplit(x, " ") |>
|
||||
sapply(\(.x){
|
||||
if (length(.x) > breaks) {
|
||||
paste(.x[seq_len(breaks)], collapse = " ")
|
||||
} else {
|
||||
paste(.x, collapse = " ")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
attr(out, which = "brks") <- breaks
|
||||
REDCapCAST::as_factor(out)
|
||||
}
|
||||
|
||||
#' Test class
|
||||
#'
|
||||
#' @param data data
|
||||
#' @param class.vec vector of class names to test
|
||||
#'
|
||||
#' @return factor
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' \dontrun{
|
||||
#' vapply(REDCapCAST::redcapcast_data, \(.x){
|
||||
#' is_any_class(.x, c("hms", "Date", "POSIXct", "POSIXt"))
|
||||
#' }, logical(1))
|
||||
#' }
|
||||
is_any_class <- function(data, class.vec) {
|
||||
any(class(data) %in% class.vec)
|
||||
}
|
||||
|
||||
#' Test is date/datetime/time
|
||||
#'
|
||||
#' @param data data
|
||||
#'
|
||||
#' @return factor
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' vapply(REDCapCAST::redcapcast_data, is_datetime, logical(1))
|
||||
is_datetime <- function(data) {
|
||||
is_any_class(data, class.vec = c("hms", "Date", "POSIXct", "POSIXt"))
|
||||
}
|
||||
|
|
@ -343,6 +343,12 @@ data_visuals_server <- function(id,
|
|||
ter = input$tertiary
|
||||
)
|
||||
|
||||
## If the dictionary holds additional arguments to pass to the
|
||||
## plotting function, these are included
|
||||
if (!is.null(rv$plot.params()[["fun.args"]])){
|
||||
parameters <- modifyList(parameters,rv$plot.params()[["fun.args"]])
|
||||
}
|
||||
|
||||
shiny::withProgress(message = i18n$t("Drawing the plot. Hold tight for a moment.."), {
|
||||
rv$plot <- rlang::exec(
|
||||
create_plot,
|
||||
|
|
@ -492,6 +498,28 @@ subset_types <- function(data, types, type.fun = data_type) {
|
|||
#' supported_plots() |> str()
|
||||
supported_plots <- function() {
|
||||
list(
|
||||
plot_bar_rel = list(
|
||||
fun = "plot_bar",
|
||||
fun.args =list(style="fill"),
|
||||
descr = i18n$t("Stacked relative barplot"),
|
||||
note = i18n$t("Create relative stacked barplots to show the distribution of categorical levels"),
|
||||
primary.type = c("dichotomous", "categorical"),
|
||||
secondary.type = c("dichotomous", "categorical"),
|
||||
secondary.multi = FALSE,
|
||||
tertiary.type = c("dichotomous", "categorical"),
|
||||
secondary.extra = NULL
|
||||
),
|
||||
plot_bar_abs = list(
|
||||
fun = "plot_bar",
|
||||
fun.args =list(style="dodge"),
|
||||
descr = i18n$t("Side-by-side barplot"),
|
||||
note = i18n$t("Create side-by-side barplot to show the distribution of categorical levels"),
|
||||
primary.type = c("dichotomous", "categorical"),
|
||||
secondary.type = c("dichotomous", "categorical"),
|
||||
secondary.multi = FALSE,
|
||||
tertiary.type = c("dichotomous", "categorical"),
|
||||
secondary.extra = "none"
|
||||
),
|
||||
plot_hbars = list(
|
||||
fun = "plot_hbars",
|
||||
descr = i18n$t("Stacked horizontal bars"),
|
||||
|
|
@ -506,7 +534,7 @@ supported_plots <- function() {
|
|||
fun = "plot_violin",
|
||||
descr = i18n$t("Violin plot"),
|
||||
note = i18n$t("A modern alternative to the classic boxplot to visualise data distribution"),
|
||||
primary.type = c("datatime", "continuous", "dichotomous", "categorical"),
|
||||
primary.type = c("datatime", "continuous"),
|
||||
secondary.type = c("dichotomous", "categorical"),
|
||||
secondary.multi = FALSE,
|
||||
secondary.extra = "none",
|
||||
|
|
@ -544,7 +572,7 @@ supported_plots <- function() {
|
|||
fun = "plot_box",
|
||||
descr = i18n$t("Box plot"),
|
||||
note = i18n$t("A classic way to plot data distribution by groups"),
|
||||
primary.type = c("datatime", "continuous", "dichotomous", "categorical"),
|
||||
primary.type = c("datatime", "continuous"),
|
||||
secondary.type = c("dichotomous", "categorical"),
|
||||
secondary.multi = FALSE,
|
||||
tertiary.type = c("dichotomous", "categorical"),
|
||||
|
|
@ -681,7 +709,7 @@ create_plot <- function(data, type, pri, sec, ter = NULL, ...) {
|
|||
out
|
||||
}
|
||||
|
||||
#' Print label, and if missing print variable name
|
||||
#' Print label, and if missing print variable name for plots
|
||||
#'
|
||||
#' @param data vector or data frame
|
||||
#' @param var variable name. Optional.
|
||||
|
|
|
|||
70
R/helpers.R
70
R/helpers.R
|
|
@ -515,18 +515,82 @@ pipe_string <- function(data, collapse = "|>\n") {
|
|||
#' @examples
|
||||
#' list(
|
||||
#' as.symbol(paste0("mtcars$", "mpg")),
|
||||
#' rlang::call2(.fn = "select", !!!list(c("cyl", "disp")), .ns = "dplyr"),
|
||||
#' rlang::call2(.fn = "select", !!!list(c("cyl", "di sp")), .ns = "dplyr"),
|
||||
#' rlang::call2(.fn = "default_parsing", .ns = "FreesearchR")
|
||||
#' ) |>
|
||||
#' merge_expression() |>
|
||||
#' expression_string()
|
||||
expression_string <- function(data, assign.str = "") {
|
||||
exp.str <- if (is.call(data)) deparse(data) else data
|
||||
# browser()
|
||||
|
||||
out <- paste0(assign.str, gsub("%>%", "|>\n", paste(gsub('"', "'", paste(exp.str, collapse = "")), collapse = "")))
|
||||
gsub(" |`", "", out)
|
||||
out <- collapse_spaces(out,preserve_newlines = FALSE)
|
||||
gsub("`", "", out)
|
||||
}
|
||||
|
||||
#' Substitue spaces/tabs with single space excluding text within quotes
|
||||
#'
|
||||
#' @description
|
||||
#' Written assisted by Claude.ai. It is long and possibly too complicated,
|
||||
#' but it works
|
||||
#'
|
||||
#'
|
||||
#' @param x character string
|
||||
#' @param preserve_newlines flag to preserve new lines
|
||||
#'
|
||||
#' @returns character string
|
||||
#'
|
||||
#' @examples
|
||||
#' collapse_spaces(c("cyl", "di sp","s e d","d e'dl e'"))
|
||||
collapse_spaces <- function(x, preserve_newlines = TRUE) {
|
||||
# Function to process a single string
|
||||
process_string <- function(text) {
|
||||
# Pattern to match single-quoted strings
|
||||
quote_pattern <- "'[^']*'"
|
||||
|
||||
# Find all quoted strings and their positions
|
||||
quotes <- gregexpr(quote_pattern, text, perl = TRUE)[[1]]
|
||||
|
||||
if (quotes[1] == -1) {
|
||||
# No quoted strings, process entire text
|
||||
if (preserve_newlines) {
|
||||
return(gsub("[ \\t]{1,}", " ", text))
|
||||
} else {
|
||||
return(gsub("\\s{1,}", " ", text))
|
||||
}
|
||||
}
|
||||
|
||||
# Extract quoted strings
|
||||
quote_lengths <- attr(quotes, "match.length")
|
||||
quoted_parts <- substring(text, quotes, quotes + quote_lengths - 1)
|
||||
|
||||
# Create placeholders
|
||||
placeholders <- paste0("__QUOTE_", seq_along(quoted_parts), "__")
|
||||
|
||||
# Replace quoted strings with placeholders
|
||||
result <- text
|
||||
for (i in seq_along(quoted_parts)) {
|
||||
result <- sub(quote_pattern, placeholders[i], result, perl = TRUE)
|
||||
}
|
||||
|
||||
# Collapse spaces in non-quoted parts
|
||||
if (preserve_newlines) {
|
||||
result <- gsub("[ \\t]{2,}", "", result)
|
||||
} else {
|
||||
result <- gsub("\\s{2,}", "", result)
|
||||
}
|
||||
|
||||
# Restore quoted strings
|
||||
for (i in seq_along(quoted_parts)) {
|
||||
result <- sub(placeholders[i], quoted_parts[i], result, fixed = TRUE)
|
||||
}
|
||||
|
||||
return(result)
|
||||
}
|
||||
|
||||
# Apply to each element of vector
|
||||
sapply(x, process_string, USE.NAMES = FALSE)
|
||||
}
|
||||
|
||||
#' Very simple function to remove nested lists, like when uploading .rds
|
||||
#'
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
hosted_version <- function()'v25.10.3-251008'
|
||||
hosted_version <- function()'v25.12.6-251212'
|
||||
|
|
|
|||
|
|
@ -1,18 +1,56 @@
|
|||
#' Data correlations evaluation module
|
||||
#'
|
||||
#' @param id Module id
|
||||
#' @param ... additional UI elements to show before the table overview
|
||||
#'
|
||||
#' @name data-missings
|
||||
#' @returns Shiny ui module
|
||||
#' @export
|
||||
data_missings_ui <- function(id) {
|
||||
data_missings_ui <- function(id, ...) {
|
||||
ns <- shiny::NS(id)
|
||||
|
||||
shiny::tagList(
|
||||
gt::gt_output(outputId = ns("missings_table"))
|
||||
list(
|
||||
bslib::layout_sidebar(
|
||||
sidebar = bslib::sidebar(
|
||||
bslib::accordion(
|
||||
id = ns("acc_mis"),
|
||||
open = "acc_chars",
|
||||
multiple = FALSE,
|
||||
bslib::accordion_panel(
|
||||
value = "acc_pan_mis",
|
||||
title = "Settings",
|
||||
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.")),
|
||||
shiny::br(),
|
||||
shiny::actionButton(
|
||||
inputId = ns("act_miss"),
|
||||
label = i18n$t("Evaluate"),
|
||||
width = "100%",
|
||||
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)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
...,
|
||||
gt::gt_output(outputId = ns("missings_table"))
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
## This should really just be rebuild to only contain a function
|
||||
|
||||
#'
|
||||
#' @param data data
|
||||
|
|
@ -23,107 +61,216 @@ data_missings_ui <- function(id) {
|
|||
#' @export
|
||||
data_missings_server <- function(id,
|
||||
data,
|
||||
variable,
|
||||
max_level = 20,
|
||||
...) {
|
||||
shiny::moduleServer(
|
||||
id = id,
|
||||
module = function(input, output, session) {
|
||||
# ns <- session$ns
|
||||
ns <- session$ns
|
||||
|
||||
datar <- if (is.reactive(data)) data else reactive(data)
|
||||
variabler <- if (is.reactive(variable)) variable else reactive(variable)
|
||||
|
||||
rv <- shiny::reactiveValues(
|
||||
data = NULL,
|
||||
table = NULL
|
||||
)
|
||||
|
||||
rv$data <- shiny::reactive({
|
||||
df_tbl <- datar()
|
||||
by_var <- variabler()
|
||||
## Notes
|
||||
##
|
||||
## Code export is still missing
|
||||
## Direct table export would be nice
|
||||
|
||||
tryCatch(
|
||||
{
|
||||
out <- compare_missings(df_tbl,by_var)
|
||||
},
|
||||
error = function(err) {
|
||||
showNotification(paste0("Error: ", err), type = "err")
|
||||
}
|
||||
)
|
||||
shiny::observe(
|
||||
output$missings_method <- shiny::renderUI({
|
||||
shiny::req(data())
|
||||
vectorSelectInput(
|
||||
inputId = ns("missings_method"),
|
||||
label = i18n$t("Analysis method for missingness overview"),
|
||||
choices = setNames(
|
||||
c(
|
||||
"predictors",
|
||||
"outcome"
|
||||
),
|
||||
c(
|
||||
i18n$t("Overview of missings across variables"),
|
||||
i18n$t("Overview of difference in variables by missing status in outcome")
|
||||
)
|
||||
)
|
||||
)
|
||||
})
|
||||
)
|
||||
|
||||
out
|
||||
})
|
||||
|
||||
output$missings_table <- gt::render_gt({
|
||||
shiny::req(datar)
|
||||
shiny::req(variabler)
|
||||
|
||||
if (is.null(variabler()) || variabler() == "" || !variabler() %in% names(datar())) {
|
||||
tbl <- rv$data()
|
||||
if (anyNA(datar())){
|
||||
title <- i18n$t("No variable chosen for analysis")
|
||||
shiny::observe({
|
||||
output$missings_var <- shiny::renderUI({
|
||||
shiny::req(datar())
|
||||
shiny::req(input$missings_method)
|
||||
# browser()
|
||||
if (input$missings_method == "predictors") {
|
||||
label <- i18n$t("Select a variable for grouped overview")
|
||||
df <- data_type_filter(data(), type = c("categorical", "dichotomous"))
|
||||
col_subset <- c("none", names(df))
|
||||
} else {
|
||||
title <- i18n$t("No missing observations")
|
||||
label <- i18n$t("Select outcome variable for overview")
|
||||
df <- datar()[apply(datar(), 2, anyNA)]
|
||||
col_subset <- names(df)
|
||||
}
|
||||
} else {
|
||||
tbl <- rv$data()|>
|
||||
gtsummary::bold_p()
|
||||
title <- glue::glue(i18n$t("Missing vs non-missing observations in the variable **'{variabler()}'**"))
|
||||
}
|
||||
|
||||
out <- tbl |>
|
||||
gtsummary::as_gt() |>
|
||||
gt::tab_header(title = gt::md(title))
|
||||
|
||||
rv$table <- out
|
||||
|
||||
out
|
||||
columnSelectInput(
|
||||
inputId = ns("missings_var"),
|
||||
label = label,
|
||||
data = df,
|
||||
col_subset = col_subset,
|
||||
none_label = i18n$t("No variable")
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
return(reactive(rv$table))
|
||||
|
||||
shiny::observeEvent(
|
||||
list(input$act_miss),
|
||||
{
|
||||
shiny::req(datar())
|
||||
shiny::req(input$missings_var)
|
||||
# browser()
|
||||
df_tbl <- datar()
|
||||
by_var <- input$missings_var
|
||||
|
||||
parameters <- list(
|
||||
by_var = by_var,
|
||||
max_level = max_level,
|
||||
type = input$missings_method
|
||||
)
|
||||
|
||||
tryCatch(
|
||||
{
|
||||
shiny::withProgress(message = i18n$t("Calculating. Hold tight for a moment.."), {
|
||||
out <- do.call(
|
||||
compare_missings,
|
||||
modifyList(parameters, list(data = df_tbl))
|
||||
)
|
||||
})
|
||||
},
|
||||
error = function(err) {
|
||||
showNotification(paste0("Error: ", err), type = "err")
|
||||
}
|
||||
)
|
||||
|
||||
if (is.null(input$missings_var) || input$missings_var == "" || !input$missings_var %in% names(datar()) || input$missings_var == "none") {
|
||||
# if (is.null(variabler()) || variabler() == "" || !variabler() %in% names(data()) || variabler() == "none") {
|
||||
# tbl <- rv$data()
|
||||
if (anyNA(datar())) {
|
||||
if (input$missings_method == "predictors") {
|
||||
title <- i18n$t("Overview of missing observations")
|
||||
} else {
|
||||
title <- i18n$t("No outcome measure chosen")
|
||||
}
|
||||
} else {
|
||||
title <- i18n$t("No missing observations")
|
||||
}
|
||||
} else {
|
||||
## Due to reactivity, the table updates too quickly. this mitigates that issue..
|
||||
|
||||
|
||||
if (input$missings_var == "predictors") {
|
||||
title <- glue::glue(i18n$t("Missings across variables by the variable **'{input$missings_var}'**"))
|
||||
} else {
|
||||
title <- glue::glue(i18n$t("Missing vs non-missing observations in the variable **'{input$missings_var}'**"))
|
||||
}
|
||||
}
|
||||
|
||||
attr(out, "tbl_title") <- title
|
||||
|
||||
rv$data <- shiny::reactive(out)
|
||||
}
|
||||
)
|
||||
|
||||
shiny::observeEvent(
|
||||
list(
|
||||
# input$act_miss
|
||||
rv$data
|
||||
),
|
||||
{
|
||||
output$missings_table <- gt::render_gt({
|
||||
shiny::req(rv$data)
|
||||
# shiny::req(input$missings_var)
|
||||
# browser()
|
||||
if ("p.value" %in% names(rv$data()[["table_body"]])) {
|
||||
tbl <- rv$data() |>
|
||||
gtsummary::bold_p()
|
||||
} else {
|
||||
tbl <- rv$data()
|
||||
}
|
||||
|
||||
|
||||
out <- tbl |>
|
||||
gtsummary::as_gt() |>
|
||||
gt::tab_header(title = gt::md(attr(tbl, "tbl_title")))
|
||||
|
||||
attr(out, "strat_var") <- input$missings_var
|
||||
|
||||
rv$table <- out
|
||||
|
||||
out
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
table_download_server(
|
||||
id = "tbl_dwn",
|
||||
data = shiny::reactive(rv$table),
|
||||
file_name = "missings_table"
|
||||
)
|
||||
|
||||
return(shiny::reactive(rv$table))
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
missing_demo_app <- function() {
|
||||
ui <- shiny::fluidPage(
|
||||
shiny::actionButton(
|
||||
inputId = "modal_missings",
|
||||
label = "Browse data",
|
||||
width = "100%",
|
||||
disabled = FALSE
|
||||
),
|
||||
shiny::selectInput(
|
||||
inputId = "missings_var",
|
||||
label = "Select variable to stratify analysis", choices = c("cyl", "vs")
|
||||
),
|
||||
data_missings_ui("data")
|
||||
ui <- do.call(
|
||||
bslib::page,
|
||||
c(
|
||||
list(
|
||||
title = i18n$t("Missings"),
|
||||
icon = bsicons::bs_icon("x-circle")
|
||||
),
|
||||
data_missings_ui(id = "data"),
|
||||
gt::gt_output("table_p")
|
||||
)
|
||||
)
|
||||
server <- function(input, output, session) {
|
||||
data_demo <- mtcars
|
||||
data_demo[sample(1:32, 10), "cyl"] <- NA
|
||||
data_demo[sample(1:32, 8), "vs"] <- NA
|
||||
|
||||
data_missings_server(id = "data", data = data_demo, variable = shiny::reactive(input$missings_var))
|
||||
rv <- shiny::reactiveValues(
|
||||
table = NULL
|
||||
)
|
||||
|
||||
visual_summary_server(id = "visual", data = data_demo)
|
||||
rv$table <- data_missings_server(id = "data", data = data_demo)
|
||||
|
||||
observeEvent(input$modal_missings, {
|
||||
tryCatch(
|
||||
{
|
||||
modal_visual_summary(id = "visual")
|
||||
},
|
||||
error = function(err) {
|
||||
showNotification(paste0("We encountered the following error browsing your data: ", err), type = "err")
|
||||
}
|
||||
)
|
||||
output$table_p <- gt::render_gt({
|
||||
rv$table
|
||||
})
|
||||
|
||||
# visual_summary_server(id = "visual", data = data_demo)
|
||||
|
||||
# observeEvent(input$modal_missings, {
|
||||
# tryCatch(
|
||||
# {
|
||||
# modal_visual_summary(id = "visual")
|
||||
# },
|
||||
# error = function(err) {
|
||||
# showNotification(paste0("We encountered the following error browsing your data: ", err), type = "err")
|
||||
# }
|
||||
# )
|
||||
# })
|
||||
}
|
||||
shiny::shinyApp(ui, server)
|
||||
}
|
||||
|
||||
missing_demo_app()
|
||||
# missing_demo_app()
|
||||
|
||||
#' Pairwise comparison of missings across covariables
|
||||
#'
|
||||
|
|
@ -133,14 +280,76 @@ missing_demo_app()
|
|||
#' @returns gtsummary list object
|
||||
#' @export
|
||||
#'
|
||||
compare_missings <- function(data,by_var){
|
||||
compare_missings <- function(
|
||||
data,
|
||||
by_var,
|
||||
max_level = 20,
|
||||
type = c("predictors", "outcome")
|
||||
) {
|
||||
type <- match.arg(type)
|
||||
|
||||
if (!is.null(by_var) && by_var != "" && by_var %in% names(data)) {
|
||||
data[[by_var]] <- ifelse(is.na(data[[by_var]]), "Missing", "Non-missing")
|
||||
data <- data |>
|
||||
lapply(\(.x){
|
||||
if (is.factor(.x)) {
|
||||
cut_var(.x, breaks = 20, type = "top")
|
||||
} else {
|
||||
.x
|
||||
}
|
||||
}) |>
|
||||
dplyr::bind_cols()
|
||||
|
||||
if (type == "predictors") {
|
||||
data <- missings_logic_across(data, exclude = by_var)
|
||||
} else {
|
||||
data[[by_var]] <- ifelse(is.na(data[[by_var]]), "Missing", "Non-missing")
|
||||
}
|
||||
|
||||
out <- gtsummary::tbl_summary(data, by = by_var) |>
|
||||
gtsummary::add_p()
|
||||
} else {
|
||||
if (type == "predictors") {
|
||||
data <- missings_logic_across(data)
|
||||
}
|
||||
|
||||
out <- gtsummary::tbl_summary(data)
|
||||
}
|
||||
|
||||
out
|
||||
}
|
||||
|
||||
#' Converting all variables to logicals by missing status
|
||||
#'
|
||||
#' @param data data
|
||||
#' @param exclude character vector of variable names to be excluded
|
||||
#'
|
||||
#' @returns data frame
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' mtcars |> missings_logic_across("cyl")
|
||||
#' ## gtsummary::trial |>
|
||||
#' ## missings_logic_across() |>
|
||||
#' ## gtsummary::tbl_summary()
|
||||
missings_logic_across <- function(data, exclude = NULL) {
|
||||
# This function includes a approach way to preserve variable labels
|
||||
names(data) |>
|
||||
lapply(\(.x){
|
||||
# browser()
|
||||
# Saving original labels
|
||||
lab <- REDCapCAST::get_attr(data[[.x]], attr = "label")
|
||||
if (!.x %in% exclude) {
|
||||
out <- is.na(data[[.x]])
|
||||
} else {
|
||||
out <- data[[.x]]
|
||||
}
|
||||
if (!is.na(lab)) {
|
||||
# Restoring original labels, if not NA
|
||||
REDCapCAST::set_attr(data = out, label = lab, attr = "label", overwrite = TRUE)
|
||||
} else {
|
||||
out
|
||||
}
|
||||
}) |>
|
||||
dplyr::bind_cols(.name_repair = "unique_quiet") |>
|
||||
setNames(names(data))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
125
R/plot_bar.R
Normal file
125
R/plot_bar.R
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
plot_bar <- function(data, pri, sec, ter = NULL, style = c("stack", "dodge", "fill"), max_level = 30, ...) {
|
||||
style <- match.arg(style)
|
||||
|
||||
if (!is.null(ter)) {
|
||||
ds <- split(data, data[ter])
|
||||
} else {
|
||||
ds <- list(data)
|
||||
}
|
||||
|
||||
out <- lapply(ds, \(.ds){
|
||||
plot_bar_single(
|
||||
data = .ds,
|
||||
pri = pri,
|
||||
sec = sec,
|
||||
style = style,
|
||||
max_level = max_level
|
||||
)
|
||||
})
|
||||
|
||||
wrap_plot_list(out, title = glue::glue(i18n$t("Grouped by {get_label(data,ter)}")), ...)
|
||||
}
|
||||
|
||||
|
||||
#' Single vertical barplot
|
||||
#'
|
||||
#' @param style barplot style passed to geom_bar position argument.
|
||||
#' One of c("stack", "dodge", "fill")
|
||||
#'
|
||||
#' @name data-plots
|
||||
#'
|
||||
#' @returns ggplot object
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' mtcars |>
|
||||
#' dplyr::mutate(cyl = factor(cyl), am = factor(am)) |>
|
||||
#' plot_bar_single(pri = "cyl", sec = "am", style = "fill")
|
||||
#'
|
||||
#' mtcars |>
|
||||
#' dplyr::mutate(cyl = factor(cyl), am = factor(am)) |>
|
||||
#' plot_bar_single(pri = "cyl", style = "stack")
|
||||
plot_bar_single <- function(data, pri, sec = NULL, style = c("stack", "dodge", "fill"), max_level = 30) {
|
||||
style <- match.arg(style)
|
||||
|
||||
if (identical(sec, "none")) {
|
||||
sec <- NULL
|
||||
}
|
||||
|
||||
p_data <- as.data.frame(table(data[c(pri, sec)])) |>
|
||||
dplyr::mutate(dplyr::across(tidyselect::any_of(c(pri, sec)), forcats::as_factor),
|
||||
p = Freq / NROW(data)
|
||||
)
|
||||
|
||||
|
||||
if (nrow(p_data) > max_level) {
|
||||
# browser()
|
||||
p_data <- sort_by(
|
||||
p_data,
|
||||
p_data[["Freq"]],
|
||||
decreasing = TRUE
|
||||
) |>
|
||||
head(max_level)
|
||||
# if (is.null(sec)){
|
||||
# p_data <- sort_by(
|
||||
# p_data,
|
||||
# p_data[["Freq"]],
|
||||
# decreasing=TRUE) |>
|
||||
# head(max_level)
|
||||
# } else {
|
||||
# split(p_data,p_data[[sec]]) |>
|
||||
# lapply(\(.x){
|
||||
# # browser()
|
||||
# sort_by(
|
||||
# .x,
|
||||
# .x[["Freq"]],
|
||||
# decreasing=TRUE) |>
|
||||
# head(max_level)
|
||||
# }) |> dplyr::bind_rows()
|
||||
# }
|
||||
}
|
||||
|
||||
## Shortens long level names
|
||||
p_data[[pri]] <- forcats::as_factor(unique_short(as.character(p_data[[pri]]), max = 20))
|
||||
|
||||
if (!is.null(sec)) {
|
||||
fill <- sec
|
||||
} else {
|
||||
fill <- pri
|
||||
}
|
||||
|
||||
p <- ggplot2::ggplot(
|
||||
p_data,
|
||||
ggplot2::aes(
|
||||
x = .data[[pri]],
|
||||
y = p,
|
||||
fill = .data[[fill]]
|
||||
)
|
||||
) +
|
||||
ggplot2::geom_bar(position = style, stat = "identity") +
|
||||
ggplot2::scale_y_continuous(labels = scales::percent) +
|
||||
ggplot2::ylab("Percentage") +
|
||||
ggplot2::xlab(get_label(data,pri))+
|
||||
ggplot2::guides(fill = ggplot2::guide_legend(title = get_label(data,fill)))
|
||||
|
||||
## To handle large number of levels and long level names
|
||||
|
||||
if (nrow(p_data) > 10 | any(nchar(as.character(p_data[[pri]])) > 6)) {
|
||||
p <- p +
|
||||
# ggplot2::guides(fill = "none") +
|
||||
ggplot2::theme(
|
||||
axis.text.x = ggplot2::element_text(
|
||||
angle = 90,
|
||||
vjust = 1, hjust = 1
|
||||
))+
|
||||
ggplot2::theme(
|
||||
axis.text.x = ggplot2::element_text(vjust = 0.5)
|
||||
)
|
||||
|
||||
if (is.null(sec)){
|
||||
p <- p +
|
||||
ggplot2::guides(fill = "none")
|
||||
}
|
||||
}
|
||||
p
|
||||
}
|
||||
|
|
@ -39,8 +39,6 @@ plot_box <- function(data, pri, sec, ter = NULL,...) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#' Create nice box-plots
|
||||
#'
|
||||
#' @name data-plots
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ str_remove_last <- function(data, pattern = "\n") {
|
|||
#' mtcars |>
|
||||
#' default_parsing() |>
|
||||
#' plot_sankey("cyl", "gear", "vs", color.group = "pri")
|
||||
plot_sankey <- function(data, pri, sec, ter = NULL, color.group = "pri", colors = NULL) {
|
||||
plot_sankey <- function(data, pri, sec, ter = NULL, color.group = "pri", colors = NULL,missing.level="Missing") {
|
||||
if (!is.null(ter)) {
|
||||
ds <- split(data, data[ter])
|
||||
} else {
|
||||
|
|
@ -91,7 +91,7 @@ plot_sankey <- function(data, pri, sec, ter = NULL, color.group = "pri", colors
|
|||
}
|
||||
|
||||
out <- lapply(ds, \(.ds){
|
||||
plot_sankey_single(.ds, pri = pri, sec = sec, color.group = color.group, colors = colors)
|
||||
plot_sankey_single(.ds, pri = pri, sec = sec, color.group = color.group, colors = colors,missing.level=missing.level)
|
||||
})
|
||||
|
||||
patchwork::wrap_plots(out)
|
||||
|
|
@ -120,14 +120,21 @@ plot_sankey <- function(data, pri, sec, ter = NULL, color.group = "pri", colors
|
|||
#' mtcars |>
|
||||
#' default_parsing() |>
|
||||
#' plot_sankey_single("cyl", "vs", color.group = "pri")
|
||||
plot_sankey_single <- function(data, pri, sec, color.group = c("pri", "sec"), colors = NULL, ...) {
|
||||
#' stRoke::trial |>
|
||||
#' default_parsing() |>
|
||||
#' plot_sankey_single("diabetes", "hypertension")
|
||||
plot_sankey_single <- function(data, pri, sec, color.group = c("pri", "sec"), colors = NULL,missing.level="Missing", ...) {
|
||||
color.group <- match.arg(color.group)
|
||||
|
||||
# browser()
|
||||
data_orig <- data
|
||||
data[c(pri, sec)] <- data[c(pri, sec)] |>
|
||||
dplyr::mutate(dplyr::across(dplyr::where(is.factor), forcats::fct_drop))
|
||||
dplyr::mutate(
|
||||
# dplyr::across(dplyr::where(is.logical), as.factor),
|
||||
dplyr::across(dplyr::where(is.factor), forcats::fct_drop)#,
|
||||
# dplyr::across(dplyr::where(is.factor), \(.x){forcats::fct_na_value_to_level(.x,missing.level)})
|
||||
)
|
||||
|
||||
# browser()
|
||||
|
||||
data <- data |> sankey_ready(pri = pri, sec = sec, ...)
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ m_redcap_readUI <- function(id, title = TRUE, url = NULL) {
|
|||
width = "100%"
|
||||
),
|
||||
shiny::helpText(i18n$t("Format should be either 'https://redcap.your.institution/' or 'https://your.institution/redcap/'")),
|
||||
shiny::br(),
|
||||
shiny::br(),
|
||||
shiny::passwordInput(
|
||||
inputId = ns("api"),
|
||||
label = i18n$t("API token"),
|
||||
|
|
|
|||
450
R/separate_string.R
Normal file
450
R/separate_string.R
Normal file
|
|
@ -0,0 +1,450 @@
|
|||
#' String split module based on tidyr::separate_
|
||||
#'
|
||||
#' @param id id
|
||||
#'
|
||||
#' @returns A shiny ui module
|
||||
#' @export
|
||||
#'
|
||||
#' @name split-string
|
||||
#'
|
||||
string_split_ui <- function(id) {
|
||||
ns <- NS(id)
|
||||
tagList(
|
||||
shiny::fluidRow(
|
||||
# shiny::textOutput(outputId = ns("no_splits")),
|
||||
column(
|
||||
width = 4,
|
||||
shiny::uiOutput(outputId = ns("variable"))
|
||||
),
|
||||
column(
|
||||
width = 4,
|
||||
shiny::uiOutput(outputId = ns("delim"))
|
||||
),
|
||||
column(
|
||||
width = 4,
|
||||
shiny::uiOutput(outputId = ns("direction"))
|
||||
) # ,
|
||||
# column(
|
||||
# width = 3,
|
||||
# actionButton(
|
||||
# inputId = ns("split"),
|
||||
# label = tagList(phosphoricons::ph("scissors"), i18n$t("Split the variable")),
|
||||
# class = "btn-outline-primary float-end"
|
||||
# )
|
||||
# )
|
||||
),
|
||||
shiny::fluidRow(
|
||||
column(
|
||||
width = 4,
|
||||
shiny::h4(i18n$t("Original data")),
|
||||
toastui::datagridOutput2(outputId = ns("orig_data"))
|
||||
# DT::DTOutput(outputId = ns("orig_data_3"))
|
||||
# This doesn't render...
|
||||
# toastui::datagridOutput2(outputId = ns("orig_data_2"))
|
||||
),
|
||||
column(
|
||||
width = 8,
|
||||
shiny::h4(i18n$t("Preview of result")),
|
||||
toastui::datagridOutput2(outputId = ns("new_data"))
|
||||
)
|
||||
),
|
||||
actionButton(
|
||||
inputId = ns("create"),
|
||||
label = tagList(phosphoricons::ph("pencil"), i18n$t("Apply split")),
|
||||
class = "btn-outline-primary float-end"
|
||||
),
|
||||
tags$div(class = "clearfix")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
#' @param data_r reactive data
|
||||
#'
|
||||
#' @returns shiny module server
|
||||
#' @export
|
||||
#'
|
||||
#' @name split-string
|
||||
#'
|
||||
string_split_server <- function(id, data_r = reactive(NULL)) {
|
||||
moduleServer(
|
||||
id,
|
||||
function(input, output, session) {
|
||||
rv <- reactiveValues(data = NULL, target=NULL, temp = NULL, out=NULL)
|
||||
|
||||
ns <- session$ns
|
||||
|
||||
# output$no_splits <- shiny::renderText({
|
||||
# req({
|
||||
# data_r()
|
||||
# })
|
||||
#
|
||||
# if (any(is_splittable(data_r()))) {
|
||||
# i18n$t("No character variables with accepted delimiters detected.")
|
||||
# }
|
||||
# })
|
||||
|
||||
shiny::observe({
|
||||
req(data_r())
|
||||
|
||||
# if (any(is_splittable(data_r()))) {
|
||||
data <- data_r()
|
||||
rv$data <- data
|
||||
|
||||
vars_num <- vapply(data, \(.x){
|
||||
is_splittable(.x)
|
||||
}, logical(1))
|
||||
vars_num <- names(vars_num)[vars_num]
|
||||
|
||||
req(length(vars_num)>0)
|
||||
|
||||
output$variable <- shiny::renderUI(
|
||||
columnSelectInput(
|
||||
inputId = ns("variable"),
|
||||
data = data,
|
||||
label = i18n$t("Variable to split:"),
|
||||
width = "100%",
|
||||
col_subset = vars_num,
|
||||
selected = if (isTruthy(input$variable)) input$variable else vars_num[1]
|
||||
)
|
||||
)
|
||||
# }
|
||||
# shinyWidgets::updateVirtualSelect(
|
||||
# inputId = "variable",
|
||||
# choices = vars_num,
|
||||
# selected = if (isTruthy(input$variable)) input$variable else vars_num[1]
|
||||
# )
|
||||
})
|
||||
|
||||
output$delim <- shiny::renderUI({
|
||||
req(rv$data)
|
||||
req(input$variable)
|
||||
# browser()
|
||||
|
||||
req(input$variable %in% names(rv$data))
|
||||
# req({
|
||||
# any(apply(data_r(),2,is_splittable))
|
||||
# })
|
||||
# if (any(is_splittable(data_r()))) {
|
||||
data <- rv$data |>
|
||||
dplyr::select(tidyselect::all_of(input$variable))
|
||||
|
||||
delimiters <- Reduce(c, unique(sapply(data[[1]], detect_delimiter)))
|
||||
|
||||
# shiny::textInput(inputId = ns("delim"), label = i18n$t("Text or character to split string by"))
|
||||
shiny::selectInput(
|
||||
inputId = ns("delim"), label = i18n$t("Select delimiter"),
|
||||
choices = setNames(
|
||||
delimiters,
|
||||
glue::glue("'{delimiters}'")
|
||||
), selected = 1
|
||||
)
|
||||
# }
|
||||
})
|
||||
|
||||
|
||||
output$direction <- shiny::renderUI({
|
||||
# req({
|
||||
# rv$data
|
||||
# })
|
||||
|
||||
# if (any(is_splittable(data_r()))) {
|
||||
vectorSelectInput(
|
||||
inputId = ns("direction"),
|
||||
label = i18n$t("Direction:"),
|
||||
choices = setNames(
|
||||
c(
|
||||
"wide",
|
||||
"long"
|
||||
),
|
||||
c(
|
||||
i18n$t("Split string to multiple columns. Keep number of rows."),
|
||||
i18n$t("Split string to multiple observations (rows) in the same column. Also ads id and instance columns")
|
||||
)
|
||||
),
|
||||
selected = "wide",
|
||||
width = "100%"
|
||||
)
|
||||
# }
|
||||
})
|
||||
|
||||
observeEvent(
|
||||
list(
|
||||
input$variable,
|
||||
input$delim,
|
||||
input$direction
|
||||
),
|
||||
{
|
||||
req(rv$data)
|
||||
req(input$variable)
|
||||
req(input$delim)
|
||||
req(input$direction)
|
||||
|
||||
data <- rv$data |>
|
||||
dplyr::select(tidyselect::all_of(input$variable))
|
||||
# browser()
|
||||
rv$temp <- separate_string(
|
||||
data = data,
|
||||
col = input$variable,
|
||||
delim = input$delim,
|
||||
direction = input$direction
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
# shiny::observeEvent(input$split, {
|
||||
# show_data(rv$temp, title = i18n$t("Browse data preview"), type = "modal")
|
||||
# })
|
||||
|
||||
## Toastui would not render the original data, so the solution was to go
|
||||
## with native table rendering, which works, but doesn't please the eye
|
||||
|
||||
# output$orig_data <- shiny::renderTable({
|
||||
# req(data_r())
|
||||
# req(input$variable)
|
||||
# data <- data_r() |>
|
||||
# dplyr::select(tidyselect::all_of(input$variable))
|
||||
# # browser()
|
||||
# head(data, 10)
|
||||
# })
|
||||
|
||||
output$orig_data <- toastui::renderDatagrid2({
|
||||
req(data_r())
|
||||
req(input$variable)
|
||||
|
||||
req(hasName(rv$data, input$variable))
|
||||
|
||||
data <- data_r() |>
|
||||
dplyr::select(tidyselect::all_of(input$variable)) |>
|
||||
head(30) |>
|
||||
dplyr::mutate(row=dplyr::row_number()) |>
|
||||
dplyr::select(row,tidyselect::everything())
|
||||
# browser()
|
||||
toastui::datagrid(
|
||||
data = data,
|
||||
rowHeight = 40,
|
||||
colwidths = "guess",
|
||||
theme = "default",
|
||||
bodyHeight = "auto",
|
||||
pagination = 10)
|
||||
})
|
||||
|
||||
output$new_data <- toastui::renderDatagrid2({
|
||||
shiny::req(rv$temp)
|
||||
data <- rv$temp
|
||||
toastui::datagrid(
|
||||
data = head(data, 30),
|
||||
rowHeight = 40,
|
||||
colwidths = "guess",
|
||||
theme = "default",
|
||||
bodyHeight = "auto", pagination = 10
|
||||
)
|
||||
})
|
||||
|
||||
data_split_r <- reactive({
|
||||
req(rv$temp)
|
||||
|
||||
data <- rv$data
|
||||
|
||||
parameters <- list(
|
||||
col = input$variable,
|
||||
delim = input$delim,
|
||||
direction = input$direction
|
||||
)
|
||||
|
||||
out <- tryCatch({
|
||||
rlang::exec(separate_string, !!!modifyList(
|
||||
parameters,
|
||||
list(
|
||||
data = data
|
||||
)
|
||||
))
|
||||
})
|
||||
# browser()
|
||||
|
||||
# separate_string(
|
||||
# data = data,
|
||||
#
|
||||
# )
|
||||
|
||||
code <- rlang::call2(
|
||||
"separate_string",
|
||||
!!!parameters,
|
||||
.ns = "FreesearchR"
|
||||
)
|
||||
attr(out, "code") <- code
|
||||
out})
|
||||
|
||||
data_returned_r <- observeEvent(input$create, {
|
||||
rv$out <- data_split_r()
|
||||
})
|
||||
|
||||
return(reactive(rv$out))
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
#' @param title Modal title
|
||||
#' @param easyClose easyClose
|
||||
#' @param size size
|
||||
#' @param footer footer
|
||||
#'
|
||||
#' @returns shiny modal
|
||||
#' @export
|
||||
#'
|
||||
#' @name split-string
|
||||
modal_string_split <- function(id,
|
||||
title = i18n$t("Split character string"),
|
||||
easyClose = TRUE,
|
||||
size = "xl",
|
||||
footer = NULL) {
|
||||
ns <- NS(id)
|
||||
showModal(modalDialog(
|
||||
title = tagList(title, datamods:::button_close_modal()),
|
||||
string_split_ui(id),
|
||||
tags$div(
|
||||
style = "display: none;",
|
||||
textInput(inputId = ns("hidden"), label = NULL, value = datamods:::genId())
|
||||
),
|
||||
easyClose = easyClose,
|
||||
size = size,
|
||||
footer = footer
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
### Helpers
|
||||
|
||||
#' Separate string wide or long
|
||||
#'
|
||||
#' @param data data
|
||||
#' @param col column
|
||||
#' @param delim delimiter
|
||||
#' @param direction target direction
|
||||
#'
|
||||
#' @returns data.frame
|
||||
#' @export
|
||||
#'
|
||||
separate_string <- function(data, col, delim, direction = c("wide", "long")) {
|
||||
direction <- match.arg(direction)
|
||||
|
||||
if (direction == "long") {
|
||||
out <- data |>
|
||||
dplyr::mutate(id_str_split = dplyr::row_number()) |>
|
||||
dplyr::group_by_at("id_str_split") |>
|
||||
tidyr::separate_longer_delim(cols = tidyselect::all_of(col), delim = delim) |>
|
||||
dplyr::mutate(instance_str_split = dplyr::row_number()) |>
|
||||
# add_instance(by="id")
|
||||
dplyr::ungroup() |>
|
||||
dplyr::mutate(dplyr::across(tidyselect::matches(col), trimws))
|
||||
} else if (direction == "wide") {
|
||||
## Experiment of wide to long
|
||||
|
||||
out <- data |>
|
||||
tidyr::separate_wider_delim(
|
||||
cols = tidyselect::all_of(col),
|
||||
delim = delim,
|
||||
names_sep = "_",
|
||||
too_few = "align_start"
|
||||
) |>
|
||||
dplyr::mutate(dplyr::across(tidyselect::starts_with(col), trimws))
|
||||
}
|
||||
|
||||
out
|
||||
}
|
||||
|
||||
|
||||
|
||||
#' Detect delimiters in string based on allowed delimiters
|
||||
#'
|
||||
#' @description
|
||||
#' Accepts any repeat of delimiters and includes surrounding whitespace
|
||||
#'
|
||||
#'
|
||||
#' @param text character vector
|
||||
#' @param delimiters allowed delimiters
|
||||
#'
|
||||
#' @returns character vector
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' sapply(c("Walk - run", "Sel__Re", "what;now"), detect_delimiter)
|
||||
detect_delimiter <- function(data, delimiters = c("_", "-", ";", "\n", ",")) {
|
||||
# Create patterns for each delimiter with potential surrounding whitespace
|
||||
patterns <- paste0("\\s*\\", delimiters, "+\\s*")
|
||||
|
||||
# Check each pattern
|
||||
out <- sapply(patterns, \(.x){
|
||||
if (grepl(.x, data)) {
|
||||
# Extract the actual matched delimiter with whitespace
|
||||
regmatches(data, regexpr(.x, data))
|
||||
}
|
||||
})
|
||||
|
||||
Reduce(c, out)
|
||||
}
|
||||
|
||||
|
||||
#' Determine if any variable in data frame character and contains recognized delimiters
|
||||
#'
|
||||
#' @param data vector or data.frame
|
||||
#'
|
||||
#' @returns logical
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' any(apply(mtcars, 2, is_splittable))
|
||||
#' is_splittable(mtcars)
|
||||
is_splittable <- function(data) {
|
||||
if (is.data.frame(data)) {
|
||||
return(apply(data, 2, is_splittable))
|
||||
}
|
||||
|
||||
if (is.character(data)) {
|
||||
if (length(Reduce(c, unique(sapply(data, detect_delimiter)))) > 0) {
|
||||
TRUE
|
||||
} else {
|
||||
FALSE
|
||||
}
|
||||
} else {
|
||||
FALSE
|
||||
}
|
||||
}
|
||||
|
||||
# mtcars |> simple_dt()
|
||||
simple_dt <- function(data,...){
|
||||
headerCallbackRemoveHeaderFooter <- c(
|
||||
"function(thead, data, start, end, display){",
|
||||
" $('th', thead).css('display', 'none');",
|
||||
"}"
|
||||
)
|
||||
|
||||
DT::datatable(
|
||||
data,
|
||||
options = list(
|
||||
dom = "t",
|
||||
ordering = FALSE,
|
||||
paging = FALSE,
|
||||
searching = FALSE,
|
||||
# headerCallback = DT::JS(headerCallbackRemoveHeaderFooter),
|
||||
columnDefs = list(
|
||||
list(
|
||||
targets = 1,
|
||||
render = DT::JS(
|
||||
"function(data, type, row, meta) {",
|
||||
"return type === 'display' && data.length > 10 ?",
|
||||
"'<span title=\"' + data + '\">' + data.substr(0, 10) + '...</span>' : data;",
|
||||
"}")))
|
||||
),
|
||||
selection = 'none',
|
||||
callback = DT::JS(
|
||||
"$('table.dataTable.no-footer').css('border-bottom', 'none');"
|
||||
),
|
||||
class = 'row-border',
|
||||
escape = FALSE,
|
||||
rownames = FALSE,
|
||||
# width = 500,
|
||||
filter = "none"
|
||||
)
|
||||
}
|
||||
|
|
@ -11,15 +11,25 @@ prismCodeBlock <- function(code) {
|
|||
|
||||
prismDependencies <- tags$head(
|
||||
tags$script(src = "https://cdnjs.cloudflare.com/ajax/libs/prism/1.8.4/prism.min.js"),
|
||||
tags$link(rel = "stylesheet", type = "text/css",
|
||||
href = "https://cdnjs.cloudflare.com/ajax/libs/prism/1.8.4/themes/prism.min.css")
|
||||
tags$link(
|
||||
rel = "stylesheet", type = "text/css",
|
||||
href = "https://cdnjs.cloudflare.com/ajax/libs/prism/1.8.4/themes/prism.min.css"
|
||||
),
|
||||
tags$script(src = "https://cdnjs.cloudflare.com/ajax/libs/prism/1.8.4/components/prism-r.min.js"),
|
||||
tags$link(
|
||||
rel = "stylesheet",
|
||||
href = "https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/toolbar/prism-toolbar.min.css"
|
||||
),
|
||||
tags$script(
|
||||
src = "https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/toolbar/prism-toolbar.min.js"
|
||||
),
|
||||
tags$script(
|
||||
src = "https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js"
|
||||
)
|
||||
)
|
||||
|
||||
prismRDependency <- tags$head(
|
||||
tags$script(src = "https://cdnjs.cloudflare.com/ajax/libs/prism/1.8.4/components/prism-r.min.js")
|
||||
)
|
||||
|
||||
html_code_wrap <- function(string,lang="r"){
|
||||
html_code_wrap <- function(string, lang = "r") {
|
||||
glue::glue("<pre><code class='language-{lang}'>{string}
|
||||
</code></pre>")
|
||||
}
|
||||
|
|
|
|||
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()
|
||||
|
|
@ -99,7 +99,7 @@ ui_elements <- function(selection) {
|
|||
import_globalenv_ui(
|
||||
id = "env",
|
||||
title = NULL,
|
||||
packages = c("NHANES", "stRoke", "datasets")
|
||||
packages = c("NHANES", "stRoke", "datasets", "MASS")
|
||||
)
|
||||
),
|
||||
# shiny::conditionalPanel(
|
||||
|
|
@ -254,7 +254,7 @@ ui_elements <- function(selection) {
|
|||
width = 9,
|
||||
shiny::tags$p(
|
||||
i18n$t("Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.)."),
|
||||
i18n$t("There are more advanced options to modify factor/categorical variables as well as create new factor from a continous variable or new variables with R code. At the bottom you can restore the original data."),
|
||||
i18n$t("There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data."),
|
||||
i18n$t("Please note that data modifications are applied before any filtering.")
|
||||
)
|
||||
)
|
||||
|
|
@ -268,7 +268,7 @@ ui_elements <- function(selection) {
|
|||
shiny::tags$br(),
|
||||
shiny::fluidRow(
|
||||
shiny::column(
|
||||
width = 4,
|
||||
width = 3,
|
||||
shiny::actionButton(
|
||||
inputId = "modal_update",
|
||||
label = i18n$t("Reorder factor levels"),
|
||||
|
|
@ -280,7 +280,7 @@ ui_elements <- function(selection) {
|
|||
shiny::tags$br()
|
||||
),
|
||||
shiny::column(
|
||||
width = 4,
|
||||
width = 3,
|
||||
shiny::actionButton(
|
||||
inputId = "modal_cut",
|
||||
label = i18n$t("New factor"),
|
||||
|
|
@ -292,7 +292,19 @@ ui_elements <- function(selection) {
|
|||
shiny::tags$br()
|
||||
),
|
||||
shiny::column(
|
||||
width = 4,
|
||||
width = 3,
|
||||
shiny::actionButton(
|
||||
inputId = "modal_string",
|
||||
label = i18n$t("Split text"),
|
||||
width = "100%"
|
||||
),
|
||||
shiny::tags$br(),
|
||||
shiny::helpText(i18n$t("Split a text column by a recognised delimiter.")),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$br()
|
||||
),
|
||||
shiny::column(
|
||||
width = 3,
|
||||
shiny::actionButton(
|
||||
inputId = "modal_column",
|
||||
label = i18n$t("New variable"),
|
||||
|
|
@ -363,6 +375,17 @@ ui_elements <- function(selection) {
|
|||
value = "acc_pan_chars",
|
||||
title = "Settings",
|
||||
icon = bsicons::bs_icon("table"),
|
||||
# vectorSelectInput(
|
||||
# inputId = "baseline_theme",
|
||||
# selected = "none",
|
||||
# label = i18n$t("Select table theme"),
|
||||
# choices = c(
|
||||
# "The Journal of the American Medical Association" = "jama",
|
||||
# "The Lancet"="lancet",
|
||||
# "The New England Journal of Medicine" = "nejm",
|
||||
# "The Quarterly Journal of Economics" = "qjecon")
|
||||
# ),
|
||||
shiny::uiOutput("detail_level"),
|
||||
shiny::uiOutput("strat_var"),
|
||||
shiny::helpText(i18n$t("Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list.")),
|
||||
shiny::conditionalPanel(
|
||||
|
|
@ -377,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"),
|
||||
|
|
@ -429,26 +462,15 @@ ui_elements <- function(selection) {
|
|||
data_correlations_ui(id = "correlations", height = 600)
|
||||
)
|
||||
),
|
||||
bslib::nav_panel(
|
||||
title = i18n$t("Missings"),
|
||||
icon = bsicons::bs_icon("x-circle"),
|
||||
bslib::layout_sidebar(
|
||||
sidebar = bslib::sidebar(
|
||||
bslib::accordion(
|
||||
id = "acc_mis",
|
||||
open = "acc_chars",
|
||||
multiple = FALSE,
|
||||
bslib::accordion_panel(
|
||||
value = "acc_pan_mis",
|
||||
title = "Settings",
|
||||
icon = bsicons::bs_icon("x-circle"),
|
||||
shiny::uiOutput("missings_var"),
|
||||
shiny::helpText(i18n$t("To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random."))
|
||||
)
|
||||
)
|
||||
do.call(
|
||||
bslib::nav_panel,
|
||||
c(
|
||||
list(
|
||||
title = i18n$t("Missings"),
|
||||
icon = bsicons::bs_icon("x-circle")
|
||||
),
|
||||
validation_ui("validation_mcar"),
|
||||
data_missings_ui(id = "missingness")
|
||||
data_missings_ui(id = "missingness",
|
||||
validation_ui("validation_mcar"))
|
||||
)
|
||||
)
|
||||
),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
## Works, but not implemented
|
||||
##
|
||||
## These edits mainly allows for
|
||||
|
|
@ -101,7 +100,6 @@ update_factor_server <- function(id, data_r = reactive(NULL)) {
|
|||
moduleServer(
|
||||
id,
|
||||
function(input, output, session) {
|
||||
|
||||
rv <- reactiveValues(data = NULL, data_grid = NULL)
|
||||
|
||||
bindEvent(observe({
|
||||
|
|
@ -207,19 +205,37 @@ update_factor_server <- function(id, data_r = reactive(NULL)) {
|
|||
data <- req(data_r())
|
||||
variable <- req(input$variable)
|
||||
grid <- req(input$grid_data)
|
||||
name_var <- if (isTRUE(input$new_var)) {
|
||||
paste0(variable, "_updated")
|
||||
} else {
|
||||
variable
|
||||
}
|
||||
data[[name_var]] <- factor(
|
||||
as.character(data[[variable]]),
|
||||
levels = grid[["Var1"]]
|
||||
|
||||
parameters <- list(
|
||||
variable = variable,
|
||||
new_variable = isTRUE(input$new_var) | any(grid[["Var1_toset"]] == "New label"),
|
||||
new_levels = as.character(grid[["Var1"]]),
|
||||
new_labels = as.character(grid[["Var1_toset"]]),
|
||||
ignore = "New label"
|
||||
)
|
||||
data[[name_var]] <- factor(
|
||||
data[[variable]],
|
||||
labels = ifelse(grid[["Var1_toset"]]=="New label",grid[["Var1"]],grid[["Var1_toset"]])
|
||||
|
||||
data <- tryCatch(
|
||||
{
|
||||
rlang::exec(
|
||||
factor_new_levels_labels,
|
||||
!!!modifyList(parameters,
|
||||
val = list(data = data)
|
||||
)
|
||||
)
|
||||
},
|
||||
error = function(err) {
|
||||
showNotification(paste("We encountered the following error creating the new factor:", err), type = "err")
|
||||
}
|
||||
)
|
||||
|
||||
# browser()
|
||||
code <- rlang::call2(
|
||||
"factor_new_levels_labels",
|
||||
!!!parameters,
|
||||
.ns = "FreesearchR"
|
||||
)
|
||||
attr(data, "code") <- code
|
||||
|
||||
data
|
||||
})
|
||||
|
||||
|
|
@ -231,6 +247,62 @@ update_factor_server <- function(id, data_r = reactive(NULL)) {
|
|||
)
|
||||
}
|
||||
|
||||
#' Simple function to apply new levels and/or labels to factor
|
||||
#'
|
||||
#' @param variable factor variable
|
||||
#' @param new_level new levels, same length as original
|
||||
#' @param new_label new labels, same length as original
|
||||
#' @param ignore character string to ignore in new labels
|
||||
#'
|
||||
#' @returns factor
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' data_n <- mtcars
|
||||
#' data_n$cyl <- factor(data_n$cyl)
|
||||
#' factor_new_levels_labels(data_n, "cyl", new_labels = c("four", "New label", "New label"))
|
||||
factor_new_levels_labels <- function(
|
||||
data,
|
||||
variable,
|
||||
new_variable = TRUE,
|
||||
new_levels = NULL,
|
||||
new_labels = NULL,
|
||||
ignore = "New label") {
|
||||
if (!is.factor(data[[variable]])) {
|
||||
return(data)
|
||||
}
|
||||
|
||||
if (is.null(new_levels)) {
|
||||
new_levels <- levels(data[[variable]])
|
||||
}
|
||||
|
||||
if (is.null(new_labels)) {
|
||||
new_labels <- labels(data[[variable]])
|
||||
}
|
||||
|
||||
with_level <- factor(
|
||||
as.character(data[[variable]]),
|
||||
levels = new_levels
|
||||
)
|
||||
with_label <- factor(
|
||||
with_level,
|
||||
labels = ifelse(new_labels == "New label", new_levels, new_labels)
|
||||
)
|
||||
|
||||
# browser()
|
||||
|
||||
if (isTRUE(new_variable)) {
|
||||
append_column(
|
||||
data = data,
|
||||
column = with_label,
|
||||
name = unique_names(new = paste0(variable, "_updated"), existing = names(data))
|
||||
)
|
||||
} else {
|
||||
data[[variable]] <- new_variable
|
||||
data
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#' @inheritParams shiny::modalDialog
|
||||
|
|
@ -289,3 +361,22 @@ winbox_update_factor <- function(id,
|
|||
)
|
||||
}
|
||||
|
||||
|
||||
#' Make unique variable names
|
||||
#'
|
||||
#' Helper function to create new variable names that are unique
|
||||
#' given a set of existing names (in a data set, for example).
|
||||
#' If a variable name already exists, a number will be appended.
|
||||
#'
|
||||
#' @param new a vector of proposed new variable names
|
||||
#' @param existing a vector of existing variable names
|
||||
#' @return a vector of unique new variable names
|
||||
#' @examples
|
||||
#' unique_names(c("var_x", "var_y", "var_x"), c("var_x", "var_z"))
|
||||
#'
|
||||
#' @export
|
||||
unique_names <- function(new, existing = character()) {
|
||||
new_names <- make.unique(c(existing, new), sep = "_")
|
||||
|
||||
new_names[-seq_along(existing)]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -688,7 +688,7 @@ convert_to <- function(data,
|
|||
|
||||
#' Get variable(s) to convert
|
||||
#'
|
||||
#' @param vars Output of [summary_vars()]
|
||||
#' @param vars variables, output from summary_vars() function
|
||||
#' @param classes_input List of inputs containing new classes
|
||||
#'
|
||||
#' @return a `data.table`.
|
||||
|
|
|
|||
|
|
@ -109,6 +109,9 @@ validation_server <- function(id,
|
|||
purrr::list_flatten()
|
||||
} else if (length(to_validate) > 0) {
|
||||
out <- make_validation_alerts(to_validate)
|
||||
} else {
|
||||
## Defaulting to an emptu output vector
|
||||
out <- character()
|
||||
}
|
||||
valid_ui$x <- tagList(out)
|
||||
}
|
||||
|
|
@ -332,7 +335,7 @@ validation_lib <- function(name = NULL) {
|
|||
"mcar" = function(x, y) {
|
||||
### Placeholder for missingness validation
|
||||
list(
|
||||
string = i18n$t("There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}."),
|
||||
string = i18n$t("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}."),
|
||||
summary.fun = mcar_validate,
|
||||
summary.fun.args = list(
|
||||
data = x,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
#' @returns Shiny ui module
|
||||
#' @export
|
||||
#'
|
||||
#' @example examples/visual_summary_demo.R
|
||||
visual_summary_ui <- function(id) {
|
||||
ns <- shiny::NS(id)
|
||||
|
||||
|
|
@ -100,14 +99,6 @@ modal_visual_summary <- function(id,
|
|||
#' @returns An [apexchart()] `htmlwidget` object.
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' data_demo <- mtcars
|
||||
#' data_demo[2:4, "cyl"] <- NA
|
||||
#' rbind(data_demo, data_demo, data_demo, data_demo) |> missings_apex_plot()
|
||||
#' data_demo |> missings_apex_plot()
|
||||
#' mtcars |> missings_apex_plot(animation = TRUE)
|
||||
#' # dplyr::storms |> missings_apex_plot()
|
||||
#' visdat::vis_dat(dplyr::storms)
|
||||
missings_apex_plot <- function(data, animation = FALSE, ...) {
|
||||
l <- data_summary_gather(data, ...)
|
||||
|
||||
|
|
@ -158,14 +149,6 @@ missings_apex_plot <- function(data, animation = FALSE, ...) {
|
|||
#' @returns ggplot2 object
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' data_demo <- mtcars
|
||||
#' data_demo[sample(1:32, 10), "cyl"] <- NA
|
||||
#' data_demo[sample(1:32, 8), "vs"] <- NA
|
||||
#' visual_summary(data_demo)
|
||||
#' visual_summary(data_demo, palette.fun = scales::hue_pal())
|
||||
#' visual_summary(dplyr::storms, summary.fun = data_type)
|
||||
#' visual_summary(dplyr::storms, summary.fun = data_type, na.label = "Missings", legend.title = "Class")
|
||||
visual_summary <- function(data, legend.title = NULL, ylab = "Observations", ...) {
|
||||
l <- data_summary_gather(data, ...)
|
||||
|
||||
|
|
@ -217,7 +200,7 @@ visual_summary <- function(data, legend.title = NULL, ylab = "Observations", ...
|
|||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' mtcars |> data_summary_gather()
|
||||
#' mtcars |> data_summary_gather() |> names()
|
||||
data_summary_gather <- function(data, summary.fun = class, palette.fun = viridisLite::viridis, na.label = "NA", ...) {
|
||||
df_plot <- setNames(data, unique_short(names(data))) |>
|
||||
purrr::map_df(\(x){
|
||||
|
|
|
|||
|
|
@ -68,11 +68,15 @@ services:
|
|||
|
||||
Please note that the ***FreesearchR*** project is published with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
|
||||
|
||||
## Translators
|
||||
|
||||
Thank you very much to all translators having helped to translate and validate translation drafts.
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
Like any other project, this project was never possible without the great work of others. These are some of the sources and packages I have used:
|
||||
|
||||
- The ***FreesearchR*** app is build with [Shiny](https://shiny.posit.co/) and based on [*R*](https://www.r-project.org/).
|
||||
- The ***FreesearchR*** app is built with [Shiny](https://shiny.posit.co/) and based on [*R*](https://www.r-project.org/).
|
||||
|
||||
- [gtsummary](https://www.danieldsjoberg.com/gtsummary/): superb and flexible way to create publication-ready analytical and summary tables.
|
||||
|
||||
|
|
|
|||
208
SESSION.md
208
SESSION.md
|
|
@ -1,21 +1,21 @@
|
|||
--------------------------------------------------------------------------------
|
||||
-------------------------------- R environment ---------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
|setting |value |
|
||||
|:-----------|:------------------------------------------|
|
||||
|version |R version 4.4.1 (2024-06-14) |
|
||||
|os |macOS 15.7 |
|
||||
|system |aarch64, darwin20 |
|
||||
|ui |RStudio |
|
||||
|language |(EN) |
|
||||
|collate |en_US.UTF-8 |
|
||||
|ctype |en_US.UTF-8 |
|
||||
|tz |Europe/Copenhagen |
|
||||
|date |2025-10-08 |
|
||||
|rstudio |2025.05.0+496 Mariposa Orchid (desktop) |
|
||||
|pandoc |3.6.4 @ /opt/homebrew/bin/ (via rmarkdown) |
|
||||
|quarto |1.7.30 @ /usr/local/bin/quarto |
|
||||
|FreesearchR |25.10.3.251008 |
|
||||
|setting |value |
|
||||
|:-----------|:----------------------------------------------|
|
||||
|version |R version 4.4.1 (2024-06-14) |
|
||||
|os |macOS 26.1 |
|
||||
|system |aarch64, darwin20 |
|
||||
|ui |RStudio |
|
||||
|language |(EN) |
|
||||
|collate |en_US.UTF-8 |
|
||||
|ctype |en_US.UTF-8 |
|
||||
|tz |Europe/Copenhagen |
|
||||
|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.6.251212 |
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
|
@ -26,190 +26,205 @@
|
|||
|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.16.1 |2025-07-01 |CRAN (R 4.4.1) |
|
||||
|bayestestR |0.17.0 |2025-08-29 |CRAN (R 4.4.1) |
|
||||
|bit |4.6.0 |2025-03-06 |CRAN (R 4.4.1) |
|
||||
|bit64 |4.6.0-1 |2025-01-16 |CRAN (R 4.4.1) |
|
||||
|bitops |1.0-9 |2024-10-03 |CRAN (R 4.4.1) |
|
||||
|boot |1.3-31 |2024-08-28 |RSPM (R 4.4.0) |
|
||||
|boot |1.3-32 |2025-08-29 |CRAN (R 4.4.1) |
|
||||
|brio |1.1.5 |2024-04-24 |CRAN (R 4.4.1) |
|
||||
|broom |1.0.9 |2025-07-28 |CRAN (R 4.4.1) |
|
||||
|broom.helpers |1.21.0 |2025-04-24 |CRAN (R 4.4.1) |
|
||||
|broom |1.0.11 |2025-12-04 |CRAN (R 4.4.3) |
|
||||
|broom.helpers |1.22.0 |2025-09-17 |CRAN (R 4.4.1) |
|
||||
|bsicons |0.1.2 |2023-11-04 |CRAN (R 4.4.0) |
|
||||
|bslib |0.9.0 |2025-01-30 |CRAN (R 4.4.1) |
|
||||
|cachem |1.1.0 |2024-05-16 |CRAN (R 4.4.1) |
|
||||
|calendar |0.2.0 |2024-08-20 |CRAN (R 4.4.1) |
|
||||
|cards |0.6.1 |2025-07-03 |CRAN (R 4.4.1) |
|
||||
|cardx |0.2.5 |2025-07-03 |CRAN (R 4.4.1) |
|
||||
|cards |0.7.1 |2025-12-02 |CRAN (R 4.4.3) |
|
||||
|cardx |0.3.1 |2025-12-04 |CRAN (R 4.4.3) |
|
||||
|caTools |1.18.3 |2024-09-04 |CRAN (R 4.4.1) |
|
||||
|cellranger |1.1.0 |2016-07-27 |CRAN (R 4.4.0) |
|
||||
|checkmate |2.3.2 |2024-07-29 |RSPM (R 4.4.0) |
|
||||
|cffr |1.2.0 |2025-01-25 |CRAN (R 4.4.1) |
|
||||
|checkmate |2.3.3 |2025-08-18 |CRAN (R 4.4.1) |
|
||||
|class |7.3-23 |2025-01-01 |CRAN (R 4.4.1) |
|
||||
|classInt |0.4-11 |2025-01-08 |CRAN (R 4.4.1) |
|
||||
|cli |3.6.5 |2025-04-23 |CRAN (R 4.4.1) |
|
||||
|cluster |2.1.8.1 |2025-03-12 |CRAN (R 4.4.1) |
|
||||
|codetools |0.2-20 |2024-03-31 |CRAN (R 4.4.1) |
|
||||
|colorspace |2.1-1 |2024-07-26 |CRAN (R 4.4.1) |
|
||||
|colorspace |2.1-2 |2025-09-22 |CRAN (R 4.4.1) |
|
||||
|commonmark |2.0.0 |2025-07-07 |CRAN (R 4.4.1) |
|
||||
|crayon |1.5.3 |2024-06-20 |CRAN (R 4.4.1) |
|
||||
|curl |7.0.0 |2025-08-19 |CRAN (R 4.4.1) |
|
||||
|data.table |1.17.8 |2025-07-10 |CRAN (R 4.4.1) |
|
||||
|datamods |1.5.3 |2024-10-02 |CRAN (R 4.4.1) |
|
||||
|datawizard |1.2.0 |2025-07-17 |CRAN (R 4.4.1) |
|
||||
|datawizard |1.3.0 |2025-10-11 |CRAN (R 4.4.1) |
|
||||
|DEoptimR |1.1-4 |2025-07-27 |CRAN (R 4.4.1) |
|
||||
|desc |1.4.3 |2023-12-10 |CRAN (R 4.4.1) |
|
||||
|devtools |2.4.5 |2022-10-11 |CRAN (R 4.4.0) |
|
||||
|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.37 |2024-08-19 |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.33 |2024-04-04 |CRAN (R 4.4.0) |
|
||||
|DT |0.34.0 |2025-09-02 |CRAN (R 4.4.1) |
|
||||
|e1071 |1.7-16 |2024-09-16 |CRAN (R 4.4.1) |
|
||||
|easystats |0.7.5 |2025-07-11 |CRAN (R 4.4.1) |
|
||||
|effectsize |1.0.1 |2025-05-27 |CRAN (R 4.4.1) |
|
||||
|ellipsis |0.3.2 |2021-04-29 |CRAN (R 4.4.1) |
|
||||
|emmeans |1.11.2 |2025-07-11 |CRAN (R 4.4.1) |
|
||||
|emmeans |2.0.0 |2025-10-29 |CRAN (R 4.4.1) |
|
||||
|esquisse |2.1.0 |2025-02-21 |CRAN (R 4.4.1) |
|
||||
|estimability |1.5.1 |2024-05-12 |CRAN (R 4.4.1) |
|
||||
|eulerr |7.0.2 |2024-03-28 |CRAN (R 4.4.0) |
|
||||
|evaluate |1.0.4 |2025-06-18 |RSPM (R 4.4.0) |
|
||||
|eulerr |7.0.4 |2025-09-24 |CRAN (R 4.4.1) |
|
||||
|evaluate |1.0.5 |2025-08-27 |CRAN (R 4.4.1) |
|
||||
|farver |2.1.2 |2024-05-13 |CRAN (R 4.4.1) |
|
||||
|fastmap |1.2.0 |2024-05-15 |CRAN (R 4.4.1) |
|
||||
|flextable |0.9.9 |2025-05-31 |CRAN (R 4.4.1) |
|
||||
|flextable |0.9.10 |2025-08-24 |CRAN (R 4.4.1) |
|
||||
|fontawesome |0.5.3 |2024-11-16 |CRAN (R 4.4.1) |
|
||||
|fontBitstreamVera |0.1.1 |2017-02-01 |CRAN (R 4.4.1) |
|
||||
|fontLiberation |0.1.0 |2016-10-15 |CRAN (R 4.4.1) |
|
||||
|fontquiver |0.2.1 |2017-02-01 |CRAN (R 4.4.0) |
|
||||
|forcats |1.0.0 |2023-01-29 |RSPM (R 4.4.0) |
|
||||
|forcats |1.0.1 |2025-09-25 |CRAN (R 4.4.1) |
|
||||
|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.10.3 |NA |NA |
|
||||
|FreesearchR |25.12.6 |NA |NA |
|
||||
|fs |1.6.6 |2025-04-12 |CRAN (R 4.4.1) |
|
||||
|gdtools |0.4.2 |2025-03-27 |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) |
|
||||
|ggalluvial |0.12.5 |2023-02-22 |CRAN (R 4.4.0) |
|
||||
|ggcorrplot |0.1.4.1 |2023-09-05 |CRAN (R 4.4.0) |
|
||||
|ggforce |0.5.0 |2025-06-18 |CRAN (R 4.4.1) |
|
||||
|ggplot2 |3.5.2 |2025-04-09 |CRAN (R 4.4.1) |
|
||||
|ggridges |0.5.6 |2024-01-23 |CRAN (R 4.4.0) |
|
||||
|ggstats |0.10.0 |2025-07-02 |CRAN (R 4.4.1) |
|
||||
|ggplot2 |4.0.1 |2025-11-14 |CRAN (R 4.4.1) |
|
||||
|ggridges |0.5.7 |2025-08-27 |CRAN (R 4.4.1) |
|
||||
|ggstats |0.11.0 |2025-09-15 |CRAN (R 4.4.1) |
|
||||
|glue |1.8.0 |2024-09-30 |CRAN (R 4.4.1) |
|
||||
|gridExtra |2.3 |2017-09-09 |CRAN (R 4.4.1) |
|
||||
|gt |1.0.0 |2025-04-05 |CRAN (R 4.4.1) |
|
||||
|gt |1.1.0 |2025-09-23 |CRAN (R 4.4.1) |
|
||||
|gtable |0.3.6 |2024-10-25 |CRAN (R 4.4.1) |
|
||||
|gtsummary |2.3.0 |2025-07-03 |CRAN (R 4.4.1) |
|
||||
|gtsummary |2.5.0 |2025-12-05 |CRAN (R 4.4.3) |
|
||||
|haven |2.5.5 |2025-05-30 |CRAN (R 4.4.1) |
|
||||
|here |1.0.1 |2020-12-13 |CRAN (R 4.4.1) |
|
||||
|Hmisc |5.2-3 |2025-03-16 |CRAN (R 4.4.1) |
|
||||
|hms |1.1.3 |2023-03-21 |CRAN (R 4.4.0) |
|
||||
|here |1.0.2 |2025-09-15 |CRAN (R 4.4.1) |
|
||||
|Hmisc |5.2-4 |2025-10-05 |CRAN (R 4.4.1) |
|
||||
|hms |1.1.4 |2025-10-17 |CRAN (R 4.4.1) |
|
||||
|htmlTable |2.4.3 |2024-07-21 |CRAN (R 4.4.0) |
|
||||
|htmltools |0.5.8.1 |2024-04-04 |CRAN (R 4.4.1) |
|
||||
|htmltools |0.5.9 |2025-12-04 |CRAN (R 4.4.3) |
|
||||
|htmlwidgets |1.6.4 |2023-12-06 |CRAN (R 4.4.0) |
|
||||
|httpuv |1.6.16 |2025-04-16 |CRAN (R 4.4.1) |
|
||||
|IDEAFilter |0.2.1 |2025-07-29 |CRAN (R 4.4.1) |
|
||||
|insight |1.4.0 |2025-08-18 |CRAN (R 4.4.1) |
|
||||
|insight |1.4.4 |2025-12-06 |CRAN (R 4.4.3) |
|
||||
|iterators |1.0.14 |2022-02-05 |CRAN (R 4.4.1) |
|
||||
|jquerylib |0.1.4 |2021-04-26 |CRAN (R 4.4.0) |
|
||||
|jsonlite |2.0.0 |2025-03-27 |CRAN (R 4.4.1) |
|
||||
|jsonvalidate |1.5.0 |2025-02-07 |CRAN (R 4.4.1) |
|
||||
|KernSmooth |2.23-26 |2025-01-01 |CRAN (R 4.4.1) |
|
||||
|keyring |1.4.1 |2025-06-15 |CRAN (R 4.4.1) |
|
||||
|knitr |1.50 |2025-03-16 |CRAN (R 4.4.1) |
|
||||
|labelled |2.14.1 |2025-05-06 |CRAN (R 4.4.1) |
|
||||
|later |1.4.2 |2025-04-08 |RSPM (R 4.4.0) |
|
||||
|labeling |0.4.3 |2023-08-29 |CRAN (R 4.4.1) |
|
||||
|later |1.4.4 |2025-08-27 |CRAN (R 4.4.1) |
|
||||
|lattice |0.22-7 |2025-04-02 |CRAN (R 4.4.1) |
|
||||
|lifecycle |1.0.4 |2023-11-07 |CRAN (R 4.4.1) |
|
||||
|litedown |0.7 |2025-04-08 |CRAN (R 4.4.1) |
|
||||
|lme4 |1.1-37 |2025-03-26 |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) |
|
||||
|magrittr |2.0.3 |2022-03-30 |RSPM (R 4.4.0) |
|
||||
|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-3 |2025-03-11 |RSPM (R 4.4.0) |
|
||||
|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) |
|
||||
|miniUI |0.1.2 |2025-04-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) |
|
||||
|NHANES |2.1.0 |2015-07-02 |CRAN (R 4.4.0) |
|
||||
|nlme |3.1-168 |2025-03-31 |CRAN (R 4.4.1) |
|
||||
|nloptr |2.2.1 |2025-03-17 |CRAN (R 4.4.1) |
|
||||
|nnet |7.3-20 |2025-01-01 |CRAN (R 4.4.1) |
|
||||
|officer |0.6.10 |2025-05-30 |CRAN (R 4.4.1) |
|
||||
|officer |0.7.2 |2025-12-04 |CRAN (R 4.4.3) |
|
||||
|opdisDownsampling |1.0.1 |2024-04-15 |CRAN (R 4.4.0) |
|
||||
|openssl |2.3.3 |2025-05-26 |CRAN (R 4.4.1) |
|
||||
|openxlsx2 |1.18 |2025-07-29 |CRAN (R 4.4.1) |
|
||||
|parameters |0.27.0 |2025-07-09 |CRAN (R 4.4.1) |
|
||||
|patchwork |1.3.1 |2025-06-21 |RSPM (R 4.4.0) |
|
||||
|openssl |2.3.4 |2025-09-30 |CRAN (R 4.4.1) |
|
||||
|openxlsx2 |1.22 |2025-12-07 |CRAN (R 4.4.3) |
|
||||
|otel |0.2.0 |2025-08-29 |CRAN (R 4.4.1) |
|
||||
|pak |0.9.1 |2025-12-01 |CRAN (R 4.4.3) |
|
||||
|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) |
|
||||
|performance |0.15.0 |2025-07-10 |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.0 |2025-07-04 |RSPM (R 4.4.0) |
|
||||
|pillar |1.11.1 |2025-09-17 |CRAN (R 4.4.1) |
|
||||
|pkgbuild |1.4.8 |2025-05-26 |CRAN (R 4.4.1) |
|
||||
|pkgconfig |2.0.3 |2019-09-22 |CRAN (R 4.4.1) |
|
||||
|pkgload |1.4.0 |2024-06-28 |RSPM (R 4.4.0) |
|
||||
|pkgload |1.4.1 |2025-09-23 |CRAN (R 4.4.1) |
|
||||
|plyr |1.8.9 |2023-10-02 |CRAN (R 4.4.1) |
|
||||
|polyclip |1.10-7 |2024-07-23 |CRAN (R 4.4.1) |
|
||||
|pracma |2.4.4 |2023-11-10 |CRAN (R 4.4.1) |
|
||||
|pracma |2.4.6 |2025-10-22 |CRAN (R 4.4.1) |
|
||||
|processx |3.8.6 |2025-02-21 |CRAN (R 4.4.1) |
|
||||
|profvis |0.4.0 |2024-09-20 |CRAN (R 4.4.1) |
|
||||
|promises |1.3.3 |2025-05-29 |CRAN (R 4.4.1) |
|
||||
|promises |1.5.0 |2025-11-01 |CRAN (R 4.4.1) |
|
||||
|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.1.0 |2025-07-10 |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.6 |2023-01-25 |CRAN (R 4.4.0) |
|
||||
|quarto |1.5.0 |2025-07-28 |RSPM (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) |
|
||||
|R.cache |0.17.0 |2025-05-02 |CRAN (R 4.4.1) |
|
||||
|R.methodsS3 |1.8.2 |2022-06-13 |CRAN (R 4.4.1) |
|
||||
|R.oo |1.27.1 |2025-05-02 |CRAN (R 4.4.1) |
|
||||
|R.utils |2.13.0 |2025-02-24 |CRAN (R 4.4.1) |
|
||||
|R6 |2.6.1 |2025-02-15 |CRAN (R 4.4.1) |
|
||||
|ragg |1.4.0 |2025-04-10 |RSPM (R 4.4.0) |
|
||||
|ragg |1.5.0 |2025-09-02 |CRAN (R 4.4.1) |
|
||||
|rankinPlot |1.1.0 |2023-01-30 |CRAN (R 4.4.0) |
|
||||
|rbibutils |2.3 |2024-10-04 |CRAN (R 4.4.1) |
|
||||
|rappdirs |0.3.3 |2021-01-31 |CRAN (R 4.4.1) |
|
||||
|rbibutils |2.4 |2025-11-07 |CRAN (R 4.4.1) |
|
||||
|RColorBrewer |1.1-3 |2022-04-03 |CRAN (R 4.4.1) |
|
||||
|Rcpp |1.1.0 |2025-07-02 |CRAN (R 4.4.1) |
|
||||
|RcppArmadillo |14.6.0-1 |2025-07-02 |CRAN (R 4.4.1) |
|
||||
|RcppArmadillo |15.2.2-1 |2025-11-22 |CRAN (R 4.4.3) |
|
||||
|Rdpack |2.6.4 |2025-04-09 |CRAN (R 4.4.1) |
|
||||
|reactable |0.4.4 |2023-03-12 |CRAN (R 4.4.0) |
|
||||
|reactable |0.4.5 |2025-12-01 |CRAN (R 4.4.3) |
|
||||
|readODS |2.3.2 |2025-01-13 |CRAN (R 4.4.1) |
|
||||
|readr |2.1.5 |2024-01-10 |CRAN (R 4.4.0) |
|
||||
|readr |2.1.6 |2025-11-14 |CRAN (R 4.4.3) |
|
||||
|readxl |1.4.5 |2025-03-07 |CRAN (R 4.4.1) |
|
||||
|REDCapCAST |25.3.2 |2025-03-10 |CRAN (R 4.4.1) |
|
||||
|REDCapR |1.5.0 |2025-07-28 |CRAN (R 4.4.1) |
|
||||
|reformulas |0.4.1 |2025-04-30 |CRAN (R 4.4.1) |
|
||||
|REDCapR |1.6.0 |2025-10-08 |CRAN (R 4.4.1) |
|
||||
|reformulas |0.4.2 |2025-10-28 |CRAN (R 4.4.1) |
|
||||
|remotes |2.5.0 |2024-03-17 |CRAN (R 4.4.1) |
|
||||
|rempsyc |0.1.9 |2025-02-01 |CRAN (R 4.4.1) |
|
||||
|rempsyc |0.2.0 |2025-09-15 |CRAN (R 4.4.1) |
|
||||
|renv |1.1.5 |2025-07-24 |CRAN (R 4.4.1) |
|
||||
|reshape2 |1.4.4 |2020-04-09 |CRAN (R 4.4.0) |
|
||||
|rio |1.2.3 |2024-09-25 |CRAN (R 4.4.1) |
|
||||
|reshape2 |1.4.5 |2025-11-12 |CRAN (R 4.4.1) |
|
||||
|rio |1.2.4 |2025-09-26 |CRAN (R 4.4.1) |
|
||||
|rlang |1.1.6 |2025-04-11 |CRAN (R 4.4.1) |
|
||||
|rmarkdown |2.29 |2024-11-04 |CRAN (R 4.4.1) |
|
||||
|robustbase |0.99-4-1 |2024-09-27 |CRAN (R 4.4.1) |
|
||||
|roxygen2 |7.3.2 |2024-06-28 |RSPM (R 4.4.0) |
|
||||
|rmarkdown |2.30 |2025-09-28 |CRAN (R 4.4.1) |
|
||||
|robustbase |0.99-6 |2025-09-04 |CRAN (R 4.4.1) |
|
||||
|roxygen2 |7.3.3 |2025-09-03 |CRAN (R 4.4.1) |
|
||||
|rpart |4.1.24 |2025-01-07 |CRAN (R 4.4.1) |
|
||||
|rprojroot |2.1.0 |2025-07-12 |RSPM (R 4.4.0) |
|
||||
|rsconnect |1.5.0 |2025-06-26 |CRAN (R 4.4.1) |
|
||||
|rprojroot |2.1.1 |2025-08-26 |CRAN (R 4.4.1) |
|
||||
|rsconnect |1.7.0 |2025-12-06 |CRAN (R 4.4.3) |
|
||||
|rstudioapi |0.17.1 |2024-10-22 |CRAN (R 4.4.1) |
|
||||
|S7 |0.2.1 |2025-11-14 |CRAN (R 4.4.3) |
|
||||
|sass |0.4.10 |2025-04-11 |CRAN (R 4.4.1) |
|
||||
|scales |1.4.0 |2025-04-24 |CRAN (R 4.4.1) |
|
||||
|see |0.11.0 |2025-03-11 |CRAN (R 4.4.1) |
|
||||
|see |0.12.0 |2025-09-14 |CRAN (R 4.4.1) |
|
||||
|sessioninfo |1.2.3 |2025-02-05 |CRAN (R 4.4.1) |
|
||||
|shiny |1.11.1 |2025-07-03 |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) |
|
||||
|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.5.1 |2023-11-14 |RSPM (R 4.4.0) |
|
||||
|stringr |1.6.0 |2025-11-04 |CRAN (R 4.4.1) |
|
||||
|stRoke |25.9.2 |2025-09-30 |CRAN (R 4.4.1) |
|
||||
|styler |1.10.3 |2024-04-07 |CRAN (R 4.4.0) |
|
||||
|systemfonts |1.2.3 |2025-04-30 |CRAN (R 4.4.1) |
|
||||
|testthat |3.2.3 |2025-01-13 |CRAN (R 4.4.1) |
|
||||
|textshaping |1.0.1 |2025-05-01 |RSPM (R 4.4.0) |
|
||||
|thematic |0.1.7 |2025-06-19 |CRAN (R 4.4.1) |
|
||||
|styler |1.11.0 |2025-10-13 |CRAN (R 4.4.1) |
|
||||
|systemfonts |1.3.1 |2025-10-01 |CRAN (R 4.4.1) |
|
||||
|testthat |3.3.1 |2025-11-25 |CRAN (R 4.4.3) |
|
||||
|textshaping |1.0.4 |2025-10-10 |CRAN (R 4.4.1) |
|
||||
|thematic |0.1.8 |2025-09-29 |CRAN (R 4.4.1) |
|
||||
|tibble |3.3.0 |2025-06-08 |CRAN (R 4.4.1) |
|
||||
|tidyr |1.3.1 |2024-01-24 |CRAN (R 4.4.1) |
|
||||
|tidyselect |1.2.1 |2024-03-11 |CRAN (R 4.4.0) |
|
||||
|
|
@ -218,15 +233,18 @@
|
|||
|tweenr |2.0.3 |2024-02-26 |CRAN (R 4.4.0) |
|
||||
|twosamples |2.0.1 |2023-06-23 |CRAN (R 4.4.1) |
|
||||
|tzdb |0.5.0 |2025-03-15 |CRAN (R 4.4.1) |
|
||||
|urlchecker |1.0.1 |2021-11-30 |CRAN (R 4.4.1) |
|
||||
|usethis |3.1.0 |2024-11-26 |RSPM (R 4.4.0) |
|
||||
|usethis |3.2.1 |2025-09-06 |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) |
|
||||
|vroom |1.6.5 |2023-12-05 |CRAN (R 4.4.0) |
|
||||
|viridis |0.6.5 |2024-01-29 |CRAN (R 4.4.0) |
|
||||
|viridisLite |0.4.2 |2023-05-02 |CRAN (R 4.4.1) |
|
||||
|vroom |1.6.7 |2025-11-28 |CRAN (R 4.4.3) |
|
||||
|withr |3.0.2 |2024-10-28 |CRAN (R 4.4.1) |
|
||||
|writexl |1.5.4 |2025-04-15 |CRAN (R 4.4.1) |
|
||||
|xfun |0.52 |2025-04-02 |RSPM (R 4.4.0) |
|
||||
|xml2 |1.3.8 |2025-03-14 |RSPM (R 4.4.0) |
|
||||
|xfun |0.54 |2025-10-30 |CRAN (R 4.4.1) |
|
||||
|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.10 |2024-07-26 |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")'
|
||||
|
|
|
|||
2281
app_docker/app.R
2281
app_docker/app.R
File diff suppressed because it is too large
Load diff
1184
app_docker/renv.lock
1184
app_docker/renv.lock
File diff suppressed because one or more lines are too long
|
|
@ -25,7 +25,6 @@
|
|||
"Edit and create data","Ændr og opret variabler"
|
||||
"Subset, rename and convert variables","Udvælg, omdøb og konverter variabler"
|
||||
"Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.).","Nedenfor er der mulighed for at lave simple ændringer i dit datasæt, såsom at redigere variabelnavne eller beskrivelser (bedre tabeller), eller omklassificering af variabler (numerisk, factoriel/kategorisk)."
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from a continous variable or new variables with R code. At the bottom you can restore the original data.","Her er mere avancerede muligheder for at ændre faktorielle/kategoriske data, danne nye faktorielle variabler fra kontinuerte eller komplet nye baseret på R-kode. Nederst har du mulighed for at gendanne data."
|
||||
"Please note that data modifications are applied before any filtering.","Bemærk at alle ændringer i data anvendes inden filtreringen."
|
||||
"Advanced data manipulation","Avanceret datamanipulation"
|
||||
"Below options allow more advanced varaible manipulations.","Nedenfor er mulighed for avancerede ændringer i data."
|
||||
|
|
@ -50,7 +49,6 @@
|
|||
"Column added!","Variabel oprettet!"
|
||||
"Unique values:","Unikke værdier:"
|
||||
"Variable to cut:","Variabel, der skal deles:"
|
||||
"Number of breaks:","Antal niveauer:"
|
||||
"Close intervals on the right","Luk intervaller til højre"
|
||||
"Include lowest value","Inkluderer den laveste værdi"
|
||||
"Create factor variable","Opret kategorisk variabel"
|
||||
|
|
@ -152,10 +150,7 @@
|
|||
"Settings","Indstillinger"
|
||||
"The following error occured on determining correlations:","Følgende fejl opstod i forbindelse med korrelationsanalysen:"
|
||||
"We encountered the following error creating your report:","Følgende fejl opstod, da rapporten blev dannet:"
|
||||
"No variable chosen for analysis","Ingen variabel er valgt til analysen"
|
||||
"No missing observations","Ingen manglende observationer"
|
||||
"Missing vs non-missing observations in the variable **'{variabler()}'**","Manglende vs ikke-manglende observationer i variablen **'{variabler()}'**"
|
||||
"There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}.","Der er en betydelig korrelation blandt {n_nonmcar} variabler sammenlignet efter manglende observationer i {outcome}."
|
||||
"There is a total of {p_miss} % missing observations.","Der er i alt {p_miss} % manglende observationer."
|
||||
"Median:","Median:"
|
||||
"Restore original data","Gendan originale data"
|
||||
|
|
@ -248,10 +243,69 @@
|
|||
"Data characteristics table","Oversigtstabel"
|
||||
"The dataset without text variables","Datasættet uden variabler formateret som tekst"
|
||||
"Creating the table. Hold on for a moment..","Opretter tabellen. Vent et øjeblik.."
|
||||
"Select variable to stratify analysis","Vælg variabler til at stratificere analysen"
|
||||
"Generating the report. Hold on for a moment..","Opretter rapporten. Vent et øjeblik.."
|
||||
"We encountered the following error showing missingness:","Under analysen af manglende observationer opstod følgende fejl:"
|
||||
"We encountered the following error browsing your data:","I forsøget på at vise en dataoversigt opstod følgende fejl:"
|
||||
"To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random.","Vælg svarvariablen, for at få hjælp til at vurdere om manglende observationer manglende tilfældigt eller ej (kun variabler med manglende data kan vælges). Hvis der er statistisk signifikant forskel mellem nogle af de øvrige variabler i forhold til manglende data i den valgte variable kan det være et udtryk for at data ikke mangler tilfældigt."
|
||||
"Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything.","Vælg et navn til den nye variabel, skriv din formel og tryk så på knappen for at gemme variablen, eller annuler for at lukke uden at gemme."
|
||||
"Please fill in web address and API token, then press 'Connect'.","Udfyld serveradresse og API-nøgle, og tryk så 'Fobind'."
|
||||
"Other","Other"
|
||||
"Hour of the day","Time på dagen"
|
||||
"Breaks","Grupper"
|
||||
"By day of the week","Efter ugedag"
|
||||
"By weekday","Efter ugedag"
|
||||
"By week number and year","Efter ugenummer og årstal"
|
||||
"By month and year","Efter måned og årstal"
|
||||
"By month only","Efter måned alene"
|
||||
"By quarter of the year","Efter kvartal"
|
||||
"By year","Efter år"
|
||||
"Keep only most common","Behold kun de hyppigste"
|
||||
"Number","Antal"
|
||||
"Combine below percentage","Kombiner under procentsats"
|
||||
"Percentage","Procentsats"
|
||||
"By specified numbers","Efter specifikke værdier"
|
||||
"By quantiles (groups of equal size)","I grupper af samme størrelse"
|
||||
"By week number","Efter ugenummer alene"
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.","Der er mere avancerede muligheder for at ændre kategoriske variable, oprette nye kategoriske variabler fra eksisterende data eller nye variable baseret på R-kode. Nederst kan du gendanne originale data."
|
||||
"Split the variable","Split the variable"
|
||||
"Original data","Original data"
|
||||
"Preview of result","Preview of result"
|
||||
"No character variables with accepted delimiters detected.","No character variables with accepted delimiters detected."
|
||||
"Variable to split:","Variable to split:"
|
||||
"Text or character to split string by","Text or character to split string by"
|
||||
"Select delimiter","Select delimiter"
|
||||
"Direction:","Direction:"
|
||||
"Split string to multiple columns. Keep number of rows.","Split string to multiple columns. Keep number of rows."
|
||||
"Split string to multiple observations (rows) in the same column. Also ads id and instance columns","Split string to multiple observations (rows) in the same column. Also ads id and instance columns"
|
||||
"Browse data preview","Browse data preview"
|
||||
"Split character string","Split character string"
|
||||
"Split text","Split text"
|
||||
"Split a text column by a recognised delimiter.","Split a text column by a recognised delimiter."
|
||||
"Split a character string by a common delimiter","Split a character string by a common delimiter"
|
||||
"Apply split","Apply split"
|
||||
"Stacked relative barplot","Stacked relative barplot"
|
||||
"Create relative stacked barplots to show the distribution of categorical levels","Create relative stacked barplots to show the distribution of categorical levels"
|
||||
"Side-by-side barplot","Side-by-side barplot"
|
||||
"Create side-by-side barplot to show the distribution of categorical levels","Create side-by-side barplot to show the distribution of categorical levels"
|
||||
"Select table theme","Select table theme"
|
||||
"Level of detail","Level of detail"
|
||||
"Minimal","Minimal"
|
||||
"Extensive","Extensive"
|
||||
"Letters","Letters"
|
||||
"Words","Words"
|
||||
"Shorten to first letters","Shorten to first letters"
|
||||
"Shorten to first words","Shorten to first words"
|
||||
"Missings across variables by the variable **'{input$missings_var}'**","Missings across variables by the variable **'{input$missings_var}'**"
|
||||
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Missing vs non-missing observations in the variable **'{input$missings_var}'**"
|
||||
"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.","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."
|
||||
"Calculating. Hold tight for a moment..","Calculating. Hold tight for a moment.."
|
||||
"Overview of missing observations","Overview of missing observations"
|
||||
"Analysis method for missingness overview","Analysis method for missingness overview"
|
||||
"Overview of missings across variables","Overview of missings across variables"
|
||||
"Overview of difference in variables by missing status in outcome","Overview of difference in variables by missing status in outcome"
|
||||
"Select a variable for grouped overview","Select a variable for grouped overview"
|
||||
"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"
|
||||
|
|
|
|||
|
311
app_docker/translations/translation_de.csv
Normal file
311
app_docker/translations/translation_de.csv
Normal file
|
|
@ -0,0 +1,311 @@
|
|||
"en","de"
|
||||
"Hello","Hallo"
|
||||
"The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent.","The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent."
|
||||
"No variables have a correlation measure above the threshold.","No variables have a correlation measure above the threshold."
|
||||
"and","and"
|
||||
"The following error occured on determining correlations:","The following error occured on determining correlations:"
|
||||
"from each pair","from each pair"
|
||||
"New column name:","New column name:"
|
||||
"Group calculation by:","Group calculation by:"
|
||||
"Enter an expression to define new column:","Enter an expression to define new column:"
|
||||
"Click on a column name to add it to the expression:","Click on a column name to add it to the expression:"
|
||||
"Create column","Create column"
|
||||
"Cancel","Cancel"
|
||||
"Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything.","Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything."
|
||||
"New column name cannot be empty","New column name cannot be empty"
|
||||
"Create a new column","Create a new column"
|
||||
"Some operations are not allowed","Some operations are not allowed"
|
||||
"Column added!","Column added!"
|
||||
"Unique values:","Unique values:"
|
||||
"Variable to cut:","Variable to cut:"
|
||||
"Close intervals on the right","Close intervals on the right"
|
||||
"Include lowest value","Include lowest value"
|
||||
"Create factor variable","Create factor variable"
|
||||
"Fixed breaks:","Fixed breaks:"
|
||||
"Method:","Method:"
|
||||
"Other","Other"
|
||||
"Convert Numeric to Factor","Convert Numeric to Factor"
|
||||
"Hour of the day","Hour of the day"
|
||||
"Breaks","Breaks"
|
||||
"By day of the week","By day of the week"
|
||||
"By weekday","By weekday"
|
||||
"By week number and year","By week number and year"
|
||||
"By week number","By week number"
|
||||
"By month and year","By month and year"
|
||||
"By month only","By month only"
|
||||
"By quarter of the year","By quarter of the year"
|
||||
"By year","By year"
|
||||
"Keep only most common","Keep only most common"
|
||||
"Number","Number"
|
||||
"Combine below percentage","Combine below percentage"
|
||||
"Percentage","Percentage"
|
||||
"By specified numbers","By specified numbers"
|
||||
"By quantiles (groups of equal size)","By quantiles (groups of equal size)"
|
||||
"Only non-text variables are available for plotting. Go the ""Data"" to reclass data to plot.","Only non-text variables are available for plotting. Go the ""Data"" to reclass data to plot."
|
||||
"Plot","Plot"
|
||||
"Adjust settings, then press ""Plot"".","Adjust settings, then press ""Plot""."
|
||||
"Plot height (mm)","Plot height (mm)"
|
||||
"Plot width (mm)","Plot width (mm)"
|
||||
"File format","File format"
|
||||
"Download plot","Download plot"
|
||||
"Create plot","Create plot"
|
||||
"Download","Download"
|
||||
"Select variable","Select variable"
|
||||
"Response variable","Response variable"
|
||||
"Plot type","Plot type"
|
||||
"Please select","Please select"
|
||||
"Additional variables","Additional variables"
|
||||
"Secondary variable","Secondary variable"
|
||||
"No variable","No variable"
|
||||
"Grouping variable","Grouping variable"
|
||||
"No stratification","No stratification"
|
||||
"Drawing the plot. Hold tight for a moment..","Drawing the plot. Hold tight for a moment.."
|
||||
"#Plotting\n","#Plotting\n"
|
||||
"Stacked horizontal bars","Stacked horizontal bars"
|
||||
"A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars","A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars"
|
||||
"Violin plot","Violin plot"
|
||||
"A modern alternative to the classic boxplot to visualise data distribution","A modern alternative to the classic boxplot to visualise data distribution"
|
||||
"Sankey plot","Sankey plot"
|
||||
"A way of visualising change between groups","A way of visualising change between groups"
|
||||
"Scatter plot","Scatter plot"
|
||||
"A classic way of showing the association between to variables","A classic way of showing the association between to variables"
|
||||
"Box plot","Box plot"
|
||||
"A classic way to plot data distribution by groups","A classic way to plot data distribution by groups"
|
||||
"Euler diagram","Euler diagram"
|
||||
"Generate area-proportional Euler diagrams to display set relationships","Generate area-proportional Euler diagrams to display set relationships"
|
||||
"Unique:","Unique:"
|
||||
"Missing:","Missing:"
|
||||
"Most Common:","Most Common:"
|
||||
"Min:","Min:"
|
||||
"Mean:","Mean:"
|
||||
"Median:","Median:"
|
||||
"Max:","Max:"
|
||||
"{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases.","{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases."
|
||||
"Import a dataset from an environment","Import a dataset from an environment"
|
||||
"Select a data source:","Select a data source:"
|
||||
"Select source","Select source"
|
||||
"Select a dataset:","Select a dataset:"
|
||||
"List of datasets...","List of datasets..."
|
||||
"No data selected!","No data selected!"
|
||||
"Use a dataset from your environment or from the environment of a package.","Use a dataset from your environment or from the environment of a package."
|
||||
"No dataset here...","No dataset here..."
|
||||
"Imported data","Imported data"
|
||||
"Not a data.frame","Not a data.frame"
|
||||
"Rows to skip before reading data:","Rows to skip before reading data:"
|
||||
"Missing values character(s):","Missing values character(s):"
|
||||
"if several use a comma (',') to separate them","if several use a comma (',') to separate them"
|
||||
"Decimal separator:","Decimal separator:"
|
||||
"Encoding:","Encoding:"
|
||||
"Upload a file:","Upload a file:"
|
||||
"Browse...","Browse..."
|
||||
"Select sheet to import:","Select sheet to import:"
|
||||
"No file selected.","No file selected."
|
||||
"You can choose between these file types:","You can choose between these file types:"
|
||||
"You can import {file_extensions_text} files","You can import {file_extensions_text} files"
|
||||
"First five rows are shown below:","First five rows are shown below:"
|
||||
"No missing observations","No missing observations"
|
||||
"Grouped by {get_label(data,ter)}","Grouped by {get_label(data,ter)}"
|
||||
"Import data from REDCap","Import data from REDCap"
|
||||
"REDCap server","REDCap server"
|
||||
"Web address","Web address"
|
||||
"Format should be either 'https://redcap.your.institution/' or 'https://your.institution/redcap/'","Format should be either 'https://redcap.your.institution/' or 'https://your.institution/redcap/'"
|
||||
"API token","API token"
|
||||
"The token is a string of 32 numbers and letters.","The token is a string of 32 numbers and letters."
|
||||
"Connect","Connect"
|
||||
"Please fill in web address and API token, then press 'Connect'.","Please fill in web address and API token, then press 'Connect'."
|
||||
"Data import parameters","Data import parameters"
|
||||
"Select fields/variables to import and click the funnel to apply optional filters","Select fields/variables to import and click the funnel to apply optional filters"
|
||||
"Import","Import"
|
||||
"Click to see data dictionary","Click to see data dictionary"
|
||||
"Connected to server!","Connected to server!"
|
||||
"The {data_rv$info$project_title} project is loaded.","The {data_rv$info$project_title} project is loaded."
|
||||
"Data dictionary","Data dictionary"
|
||||
"Preview:","Preview:"
|
||||
"Imported data set","Imported data set"
|
||||
"Select fields/variables to import:","Select fields/variables to import:"
|
||||
"Specify the data format","Specify the data format"
|
||||
"Fill missing values?","Fill missing values?"
|
||||
"Requested data was retrieved!","Requested data was retrieved!"
|
||||
"Data retrieved, but it looks like only the ID was retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access.","Data retrieved, but it looks like only the ID was retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access."
|
||||
"Data retrieved, but it looks like not all requested fields were retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access.","Data retrieved, but it looks like not all requested fields were retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access."
|
||||
"Click to see the imported data","Click to see the imported data"
|
||||
"Regression table","Regression table"
|
||||
"Regression","Regression"
|
||||
"Specify covariables","Specify covariables"
|
||||
"If none are selected, all are included.","If none are selected, all are included."
|
||||
"Analyse","Analyse"
|
||||
"Working...","Working..."
|
||||
"Press 'Analyse' to create the regression model and after changing parameters.","Press 'Analyse' to create the regression model and after changing parameters."
|
||||
"Coefficient plot","Coefficient plot"
|
||||
"Model checks","Model checks"
|
||||
"Coefficients plot","Coefficients plot"
|
||||
"Checks","Checks"
|
||||
"Yes","Yes"
|
||||
"No","No"
|
||||
"Show p-value","Show p-value"
|
||||
"Select outcome variable","Select outcome variable"
|
||||
"Choose regression analysis","Choose regression analysis"
|
||||
"Covariables to format as categorical","Covariables to format as categorical"
|
||||
"Select variable to stratify baseline","Select variable to stratify baseline"
|
||||
"Select models to plot","Select models to plot"
|
||||
"Creating regression models failed with the following error:","Creating regression models failed with the following error:"
|
||||
"Creating a regression table failed with the following error:","Creating a regression table failed with the following error:"
|
||||
"Saving the plot. Hold on for a moment..","Saving the plot. Hold on for a moment.."
|
||||
"Running model assumptions checks failed with the following error:","Running model assumptions checks failed with the following error:"
|
||||
"Select checks to plot","Select checks to plot"
|
||||
"Multivariable regression model checks","Multivariable regression model checks"
|
||||
"www/intro.html","www/intro.html"
|
||||
"www/intro.md","www/intro.md"
|
||||
"Get started","Get started"
|
||||
"Choose your data","Choose your data"
|
||||
"Upload a file, get data directly from REDCap or use local or sample data.","Upload a file, get data directly from REDCap or use local or sample data."
|
||||
"Please be mindfull handling sensitive data","Please be mindfull handling sensitive data"
|
||||
"<p>The <em><strong>FreesearchR</strong></em> app only stores data for analyses, but please only use with sensitive data when running locally. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Read more here</a></p>","<p>The <em><strong>FreesearchR</strong></em> app only stores data for analyses, but please only use with sensitive data when running locally. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Read more here</a></p>"
|
||||
"Quick overview","Quick overview"
|
||||
"Select variables for final import","Select variables for final import"
|
||||
"Exclude incomplete variables:","Exclude incomplete variables:"
|
||||
"At 0, only complete variables are included; at 100, all variables are included.","At 0, only complete variables are included; at 100, all variables are included."
|
||||
"Manual selection:","Manual selection:"
|
||||
"Let's begin!","Let's begin!"
|
||||
"Prepare","Prepare"
|
||||
"Overview and filter","Overview and filter"
|
||||
"Overview and filtering","Overview and filtering"
|
||||
"Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse observations and apply different data filters.","Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse observations and apply different data filters."
|
||||
"Visual overview","Visual overview"
|
||||
"Browse observations","Browse observations"
|
||||
"Filter data types","Filter data types"
|
||||
"Filter observations","Filter observations"
|
||||
"Apply filter on observation","Apply filter on observation"
|
||||
"Edit and create data","Edit and create data"
|
||||
"Subset, rename and convert variables","Subset, rename and convert variables"
|
||||
"Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.).","Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.)."
|
||||
"Please note that data modifications are applied before any filtering.","Please note that data modifications are applied before any filtering."
|
||||
"Advanced data manipulation","Advanced data manipulation"
|
||||
"Below options allow more advanced varaible manipulations.","Below options allow more advanced varaible manipulations."
|
||||
"Reorder factor levels","Reorder factor levels"
|
||||
"Reorder the levels of factor/categorical variables.","Reorder the levels of factor/categorical variables."
|
||||
"New factor","New factor"
|
||||
"Create factor/categorical variable from a continous variable (number/date/time).","Create factor/categorical variable from a continous variable (number/date/time)."
|
||||
"New variable","New variable"
|
||||
"Create a new variable based on an R-expression.","Create a new variable based on an R-expression."
|
||||
"Compare modified data to original","Compare modified data to original"
|
||||
"Raw print of the original vs the modified data.","Raw print of the original vs the modified data."
|
||||
"Original data:","Original data:"
|
||||
"Modified data:","Modified data:"
|
||||
"Restore original data","Restore original data"
|
||||
"Reset to original imported dataset. Careful! There is no un-doing.","Reset to original imported dataset. Careful! There is no un-doing."
|
||||
"Evaluate","Evaluate"
|
||||
"Characteristics","Characteristics"
|
||||
"Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list.","Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list."
|
||||
"Compare strata?","Compare strata?"
|
||||
"Option to perform statistical comparisons between strata in baseline table.","Option to perform statistical comparisons between strata in baseline table."
|
||||
"Press 'Evaluate' to create the comparison table.","Press 'Evaluate' to create the comparison table."
|
||||
"Correlations","Correlations"
|
||||
"To avoid evaluating the correlation of the outcome variable, this can be excluded from the plot or select 'none'.","To avoid evaluating the correlation of the outcome variable, this can be excluded from the plot or select 'none'."
|
||||
"Correlation cut-off","Correlation cut-off"
|
||||
"Set the cut-off for considered 'highly correlated'.","Set the cut-off for considered 'highly correlated'."
|
||||
"Missings","Missings"
|
||||
"Visuals","Visuals"
|
||||
"Analysis validation","Analysis validation"
|
||||
"Report","Report"
|
||||
"Choose your favourite output file format for further work, and download, when the analyses are done.","Choose your favourite output file format for further work, and download, when the analyses are done."
|
||||
"Factor variable to reorder:","Factor variable to reorder:"
|
||||
"Sort by levels","Sort by levels"
|
||||
"Sort by count","Sort by count"
|
||||
"Create a new variable (otherwise replaces the one selected)","Create a new variable (otherwise replaces the one selected)"
|
||||
"Update factor variable","Update factor variable"
|
||||
"Sort count","Sort count"
|
||||
"Levels","Levels"
|
||||
"Count","Count"
|
||||
"Update levels of a factor","Update levels of a factor"
|
||||
"Update & select variables","Update & select variables"
|
||||
"Date format:","Date format:"
|
||||
"Date to use as origin to convert date/datetime:","Date to use as origin to convert date/datetime:"
|
||||
"Apply changes","Apply changes"
|
||||
"No data to display.","No data to display."
|
||||
"Data successfully updated!","Data successfully updated!"
|
||||
"You removed {p_out} % of observations.","You removed {p_out} % of observations."
|
||||
"You removed {p_out} % of variables.","You removed {p_out} % of variables."
|
||||
"There is a total of {p_miss} % missing observations.","There is a total of {p_miss} % missing observations."
|
||||
"Data includes {n_pairs} pairs of highly correlated variables.","Data includes {n_pairs} pairs of highly correlated variables."
|
||||
"Class","Class"
|
||||
"Observations","Observations"
|
||||
"File upload","File upload"
|
||||
"REDCap server export","REDCap server export"
|
||||
"Local or sample data","Local or sample data"
|
||||
"Data is only stored for analyses and deleted when the app is closed.","Data is only stored for analyses and deleted when the app is closed."
|
||||
"Consider [running ***FreesearchR*** locally](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine) if working with sensitive data.","Consider [running ***FreesearchR*** locally](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine) if working with sensitive data."
|
||||
"Documentation","Documentation"
|
||||
"Feedback","Feedback"
|
||||
"License: AGPLv3","License: AGPLv3"
|
||||
"Source","Source"
|
||||
"Settings","Settings"
|
||||
"The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine).","The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine)."
|
||||
"Data classes and missing observations","Data classes and missing observations"
|
||||
"We encountered the following error showing missingness:","We encountered the following error showing missingness:"
|
||||
"Please confirm data reset!","Please confirm data reset!"
|
||||
"Sure you want to reset data? This cannot be undone.","Sure you want to reset data? This cannot be undone."
|
||||
"Confirm","Confirm"
|
||||
"The filtered data","The filtered data"
|
||||
"Create new factor","Create new factor"
|
||||
"This window is aimed at advanced users and require some *R*-experience!","This window is aimed at advanced users and require some *R*-experience!"
|
||||
"Create new variables","Create new variables"
|
||||
"Select data types to include","Select data types to include"
|
||||
"Uploaded data overview","Uploaded data overview"
|
||||
"We encountered the following error browsing your data:","We encountered the following error browsing your data:"
|
||||
"Here is an overview of how your data is interpreted, and where data is missing. Use this information to consider if data is missing at random or if some observations are missing systematically wich may be caused by an observation bias.","Here is an overview of how your data is interpreted, and where data is missing. Use this information to consider if data is missing at random or if some observations are missing systematically wich may be caused by an observation bias."
|
||||
"Data import","Data import"
|
||||
"Data import formatting","Data import formatting"
|
||||
"Data modifications","Data modifications"
|
||||
"Variables filter","Variables filter"
|
||||
"Data filter","Data filter"
|
||||
"Data characteristics table","Data characteristics table"
|
||||
"The dataset without text variables","The dataset without text variables"
|
||||
"The data includes {n_col} variables. Please limit to 100.","The data includes {n_col} variables. Please limit to 100."
|
||||
"Creating the table. Hold on for a moment..","Creating the table. Hold on for a moment.."
|
||||
"Generating the report. Hold on for a moment..","Generating the report. Hold on for a moment.."
|
||||
"We encountered the following error creating your report:","We encountered the following error creating your report:"
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.","There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data."
|
||||
"Text or character to split string by","Text or character to split string by"
|
||||
"Split the variable","Split the variable"
|
||||
"Variable to split:","Variable to split:"
|
||||
"Direction:","Direction:"
|
||||
"Split string to multiple columns. Keep number of rows.","Split string to multiple columns. Keep number of rows."
|
||||
"Split string to multiple observations (rows) in the same column. Also ads id and instance columns","Split string to multiple observations (rows) in the same column. Also ads id and instance columns"
|
||||
"Split character string","Split character string"
|
||||
"Split text","Split text"
|
||||
"Split a character string by a common delimiter","Split a character string by a common delimiter"
|
||||
"Select delimiter","Select delimiter"
|
||||
"Browse data preview","Browse data preview"
|
||||
"Original data","Original data"
|
||||
"Preview of result","Preview of result"
|
||||
"No character variables with accepted delimiters detected.","No character variables with accepted delimiters detected."
|
||||
"Split a text column by a recognised delimiter.","Split a text column by a recognised delimiter."
|
||||
"Apply split","Apply split"
|
||||
"Stacked relative barplot","Stacked relative barplot"
|
||||
"Create relative stacked barplots to show the distribution of categorical levels","Create relative stacked barplots to show the distribution of categorical levels"
|
||||
"Side-by-side barplot","Side-by-side barplot"
|
||||
"Create side-by-side barplot to show the distribution of categorical levels","Create side-by-side barplot to show the distribution of categorical levels"
|
||||
"Select table theme","Select table theme"
|
||||
"Level of detail","Level of detail"
|
||||
"Minimal","Minimal"
|
||||
"Extensive","Extensive"
|
||||
"Letters","Letters"
|
||||
"Words","Words"
|
||||
"Shorten to first letters","Shorten to first letters"
|
||||
"Shorten to first words","Shorten to first words"
|
||||
"Missings across variables by the variable **'{input$missings_var}'**","Missings across variables by the variable **'{input$missings_var}'**"
|
||||
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Missing vs non-missing observations in the variable **'{input$missings_var}'**"
|
||||
"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.","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."
|
||||
"Calculating. Hold tight for a moment..","Calculating. Hold tight for a moment.."
|
||||
"Overview of missing observations","Overview of missing observations"
|
||||
"Analysis method for missingness overview","Analysis method for missingness overview"
|
||||
"Overview of missings across variables","Overview of missings across variables"
|
||||
"Overview of difference in variables by missing status in outcome","Overview of difference in variables by missing status in outcome"
|
||||
"Select a variable for grouped overview","Select a variable for grouped overview"
|
||||
"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"
|
||||
|
274
app_docker/translations/translation_se.csv
Normal file
274
app_docker/translations/translation_se.csv
Normal file
|
|
@ -0,0 +1,274 @@
|
|||
"en","se"
|
||||
"Hello","Hei"
|
||||
"The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent.","The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent."
|
||||
"No variables have a correlation measure above the threshold.","No variables have a correlation measure above the threshold."
|
||||
"and","and"
|
||||
"The following error occured on determining correlations:","The following error occured on determining correlations:"
|
||||
"from each pair","from each pair"
|
||||
"New column name:","New column name:"
|
||||
"Group calculation by:","Group calculation by:"
|
||||
"Enter an expression to define new column:","Enter an expression to define new column:"
|
||||
"Click on a column name to add it to the expression:","Click on a column name to add it to the expression:"
|
||||
"Create column","Create column"
|
||||
"Cancel","Cancel"
|
||||
"Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything.","Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything."
|
||||
"New column name cannot be empty","New column name cannot be empty"
|
||||
"Create a new column","Create a new column"
|
||||
"Some operations are not allowed","Some operations are not allowed"
|
||||
"Column added!","Column added!"
|
||||
"Unique values:","Unique values:"
|
||||
"Variable to cut:","Variable to cut:"
|
||||
"Number of breaks:","Number of breaks:"
|
||||
"Close intervals on the right","Close intervals on the right"
|
||||
"Include lowest value","Include lowest value"
|
||||
"Create factor variable","Create factor variable"
|
||||
"Fixed breaks:","Fixed breaks:"
|
||||
"Method:","Method:"
|
||||
"Other","Other"
|
||||
"Convert Numeric to Factor","Convert Numeric to Factor"
|
||||
"Hour of the day","Hour of the day"
|
||||
"Breaks","Breaks"
|
||||
"By day of the week","By day of the week"
|
||||
"By weekday","By weekday"
|
||||
"By week number and year","By week number and year"
|
||||
"By week number","By week number"
|
||||
"By month and year","By month and year"
|
||||
"By month only","By month only"
|
||||
"By quarter of the year","By quarter of the year"
|
||||
"By year","By year"
|
||||
"Keep only most common","Keep only most common"
|
||||
"Number","Number"
|
||||
"Combine below percentage","Combine below percentage"
|
||||
"Percentage","Percentage"
|
||||
"By specified numbers","By specified numbers"
|
||||
"By quantiles (groups of equal size)","By quantiles (groups of equal size)"
|
||||
"Only non-text variables are available for plotting. Go the ""Data"" to reclass data to plot.","Only non-text variables are available for plotting. Go the ""Data"" to reclass data to plot."
|
||||
"Plot","Plot"
|
||||
"Adjust settings, then press ""Plot"".","Adjust settings, then press ""Plot""."
|
||||
"Plot height (mm)","Plot height (mm)"
|
||||
"Plot width (mm)","Plot width (mm)"
|
||||
"File format","File format"
|
||||
"Download plot","Download plot"
|
||||
"Create plot","Create plot"
|
||||
"Download","Download"
|
||||
"Select variable","Select variable"
|
||||
"Response variable","Response variable"
|
||||
"Plot type","Plot type"
|
||||
"Please select","Please select"
|
||||
"Additional variables","Additional variables"
|
||||
"Secondary variable","Secondary variable"
|
||||
"No variable","No variable"
|
||||
"Grouping variable","Grouping variable"
|
||||
"No stratification","No stratification"
|
||||
"Drawing the plot. Hold tight for a moment..","Drawing the plot. Hold tight for a moment.."
|
||||
"#Plotting\n","#Plotting\n"
|
||||
"Stacked horizontal bars","Stacked horizontal bars"
|
||||
"A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars","A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars"
|
||||
"Violin plot","Violin plot"
|
||||
"A modern alternative to the classic boxplot to visualise data distribution","A modern alternative to the classic boxplot to visualise data distribution"
|
||||
"Sankey plot","Sankey plot"
|
||||
"A way of visualising change between groups","A way of visualising change between groups"
|
||||
"Scatter plot","Scatter plot"
|
||||
"A classic way of showing the association between to variables","A classic way of showing the association between to variables"
|
||||
"Box plot","Box plot"
|
||||
"A classic way to plot data distribution by groups","A classic way to plot data distribution by groups"
|
||||
"Euler diagram","Euler diagram"
|
||||
"Generate area-proportional Euler diagrams to display set relationships","Generate area-proportional Euler diagrams to display set relationships"
|
||||
"Unique:","Unique:"
|
||||
"Missing:","Missing:"
|
||||
"Most Common:","Most Common:"
|
||||
"Min:","Min:"
|
||||
"Mean:","Mean:"
|
||||
"Median:","Median:"
|
||||
"Max:","Max:"
|
||||
"{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases.","{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases."
|
||||
"Import a dataset from an environment","Import a dataset from an environment"
|
||||
"Select a data source:","Select a data source:"
|
||||
"Select source","Select source"
|
||||
"Select a dataset:","Select a dataset:"
|
||||
"List of datasets...","List of datasets..."
|
||||
"No data selected!","No data selected!"
|
||||
"Use a dataset from your environment or from the environment of a package.","Use a dataset from your environment or from the environment of a package."
|
||||
"No dataset here...","No dataset here..."
|
||||
"Imported data","Imported data"
|
||||
"Not a data.frame","Not a data.frame"
|
||||
"Rows to skip before reading data:","Rows to skip before reading data:"
|
||||
"Missing values character(s):","Missing values character(s):"
|
||||
"if several use a comma (',') to separate them","if several use a comma (',') to separate them"
|
||||
"Decimal separator:","Decimal separator:"
|
||||
"Encoding:","Encoding:"
|
||||
"Upload a file:","Upload a file:"
|
||||
"Browse...","Browse..."
|
||||
"Select sheet to import:","Select sheet to import:"
|
||||
"No file selected.","No file selected."
|
||||
"You can choose between these file types:","You can choose between these file types:"
|
||||
"You can import {file_extensions_text} files","You can import {file_extensions_text} files"
|
||||
"First five rows are shown below:","First five rows are shown below:"
|
||||
"No variable chosen for analysis","No variable chosen for analysis"
|
||||
"No missing observations","No missing observations"
|
||||
"Missing vs non-missing observations in the variable **'{variabler()}'**","Missing vs non-missing observations in the variable **'{variabler()}'**"
|
||||
"Grouped by {get_label(data,ter)}","Grouped by {get_label(data,ter)}"
|
||||
"Import data from REDCap","Import data from REDCap"
|
||||
"REDCap server","REDCap server"
|
||||
"Web address","Web address"
|
||||
"Format should be either 'https://redcap.your.institution/' or 'https://your.institution/redcap/'","Format should be either 'https://redcap.your.institution/' or 'https://your.institution/redcap/'"
|
||||
"API token","API token"
|
||||
"The token is a string of 32 numbers and letters.","The token is a string of 32 numbers and letters."
|
||||
"Connect","Connect"
|
||||
"Please fill in web address and API token, then press 'Connect'.","Please fill in web address and API token, then press 'Connect'."
|
||||
"Data import parameters","Data import parameters"
|
||||
"Select fields/variables to import and click the funnel to apply optional filters","Select fields/variables to import and click the funnel to apply optional filters"
|
||||
"Import","Import"
|
||||
"Click to see data dictionary","Click to see data dictionary"
|
||||
"Connected to server!","Connected to server!"
|
||||
"The {data_rv$info$project_title} project is loaded.","The {data_rv$info$project_title} project is loaded."
|
||||
"Data dictionary","Data dictionary"
|
||||
"Preview:","Preview:"
|
||||
"Imported data set","Imported data set"
|
||||
"Select fields/variables to import:","Select fields/variables to import:"
|
||||
"Specify the data format","Specify the data format"
|
||||
"Fill missing values?","Fill missing values?"
|
||||
"Requested data was retrieved!","Requested data was retrieved!"
|
||||
"Data retrieved, but it looks like only the ID was retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access.","Data retrieved, but it looks like only the ID was retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access."
|
||||
"Data retrieved, but it looks like not all requested fields were retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access.","Data retrieved, but it looks like not all requested fields were retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access."
|
||||
"Click to see the imported data","Click to see the imported data"
|
||||
"Regression table","Regression table"
|
||||
"Regression","Regression"
|
||||
"Specify covariables","Specify covariables"
|
||||
"If none are selected, all are included.","If none are selected, all are included."
|
||||
"Analyse","Analyse"
|
||||
"Working...","Working..."
|
||||
"Press 'Analyse' to create the regression model and after changing parameters.","Press 'Analyse' to create the regression model and after changing parameters."
|
||||
"Coefficient plot","Coefficient plot"
|
||||
"Model checks","Model checks"
|
||||
"Coefficients plot","Coefficients plot"
|
||||
"Checks","Checks"
|
||||
"Yes","Yes"
|
||||
"No","No"
|
||||
"Show p-value","Show p-value"
|
||||
"Select outcome variable","Select outcome variable"
|
||||
"Choose regression analysis","Choose regression analysis"
|
||||
"Covariables to format as categorical","Covariables to format as categorical"
|
||||
"Select variable to stratify baseline","Select variable to stratify baseline"
|
||||
"Select models to plot","Select models to plot"
|
||||
"Creating regression models failed with the following error:","Creating regression models failed with the following error:"
|
||||
"Creating a regression table failed with the following error:","Creating a regression table failed with the following error:"
|
||||
"Saving the plot. Hold on for a moment..","Saving the plot. Hold on for a moment.."
|
||||
"Running model assumptions checks failed with the following error:","Running model assumptions checks failed with the following error:"
|
||||
"Select checks to plot","Select checks to plot"
|
||||
"Multivariable regression model checks","Multivariable regression model checks"
|
||||
"www/intro.html","www/intro.html"
|
||||
"www/intro.md","www/intro.md"
|
||||
"Get started","Get started"
|
||||
"Choose your data","Choose your data"
|
||||
"Upload a file, get data directly from REDCap or use local or sample data.","Upload a file, get data directly from REDCap or use local or sample data."
|
||||
"Please be mindfull handling sensitive data","Please be mindfull handling sensitive data"
|
||||
"<p>The <em><strong>FreesearchR</strong></em> app only stores data for analyses, but please only use with sensitive data when running locally. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Read more here</a></p>","<p>The <em><strong>FreesearchR</strong></em> app only stores data for analyses, but please only use with sensitive data when running locally. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Read more here</a></p>"
|
||||
"Quick overview","Quick overview"
|
||||
"Select variables for final import","Select variables for final import"
|
||||
"Exclude incomplete variables:","Exclude incomplete variables:"
|
||||
"At 0, only complete variables are included; at 100, all variables are included.","At 0, only complete variables are included; at 100, all variables are included."
|
||||
"Manual selection:","Manual selection:"
|
||||
"Let's begin!","Let's begin!"
|
||||
"Prepare","Prepare"
|
||||
"Overview and filter","Overview and filter"
|
||||
"Overview and filtering","Overview and filtering"
|
||||
"Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse observations and apply different data filters.","Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse observations and apply different data filters."
|
||||
"Visual overview","Visual overview"
|
||||
"Browse observations","Browse observations"
|
||||
"Filter data types","Filter data types"
|
||||
"Filter observations","Filter observations"
|
||||
"Apply filter on observation","Apply filter on observation"
|
||||
"Edit and create data","Edit and create data"
|
||||
"Subset, rename and convert variables","Subset, rename and convert variables"
|
||||
"Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.).","Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.)."
|
||||
"Please note that data modifications are applied before any filtering.","Please note that data modifications are applied before any filtering."
|
||||
"Advanced data manipulation","Advanced data manipulation"
|
||||
"Below options allow more advanced varaible manipulations.","Below options allow more advanced varaible manipulations."
|
||||
"Reorder factor levels","Reorder factor levels"
|
||||
"Reorder the levels of factor/categorical variables.","Reorder the levels of factor/categorical variables."
|
||||
"New factor","New factor"
|
||||
"Create factor/categorical variable from a continous variable (number/date/time).","Create factor/categorical variable from a continous variable (number/date/time)."
|
||||
"New variable","New variable"
|
||||
"Create a new variable based on an R-expression.","Create a new variable based on an R-expression."
|
||||
"Compare modified data to original","Compare modified data to original"
|
||||
"Raw print of the original vs the modified data.","Raw print of the original vs the modified data."
|
||||
"Original data:","Original data:"
|
||||
"Modified data:","Modified data:"
|
||||
"Restore original data","Restore original data"
|
||||
"Reset to original imported dataset. Careful! There is no un-doing.","Reset to original imported dataset. Careful! There is no un-doing."
|
||||
"Evaluate","Evaluate"
|
||||
"Characteristics","Characteristics"
|
||||
"Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list.","Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list."
|
||||
"Compare strata?","Compare strata?"
|
||||
"Option to perform statistical comparisons between strata in baseline table.","Option to perform statistical comparisons between strata in baseline table."
|
||||
"Press 'Evaluate' to create the comparison table.","Press 'Evaluate' to create the comparison table."
|
||||
"Correlations","Correlations"
|
||||
"To avoid evaluating the correlation of the outcome variable, this can be excluded from the plot or select 'none'.","To avoid evaluating the correlation of the outcome variable, this can be excluded from the plot or select 'none'."
|
||||
"Correlation cut-off","Correlation cut-off"
|
||||
"Set the cut-off for considered 'highly correlated'.","Set the cut-off for considered 'highly correlated'."
|
||||
"Missings","Missings"
|
||||
"To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random.","To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random."
|
||||
"Visuals","Visuals"
|
||||
"Analysis validation","Analysis validation"
|
||||
"Report","Report"
|
||||
"Choose your favourite output file format for further work, and download, when the analyses are done.","Choose your favourite output file format for further work, and download, when the analyses are done."
|
||||
"Factor variable to reorder:","Factor variable to reorder:"
|
||||
"Sort by levels","Sort by levels"
|
||||
"Sort by count","Sort by count"
|
||||
"Create a new variable (otherwise replaces the one selected)","Create a new variable (otherwise replaces the one selected)"
|
||||
"Update factor variable","Update factor variable"
|
||||
"Sort count","Sort count"
|
||||
"Levels","Levels"
|
||||
"Count","Count"
|
||||
"Update levels of a factor","Update levels of a factor"
|
||||
"Update & select variables","Update & select variables"
|
||||
"Date format:","Date format:"
|
||||
"Date to use as origin to convert date/datetime:","Date to use as origin to convert date/datetime:"
|
||||
"Apply changes","Apply changes"
|
||||
"No data to display.","No data to display."
|
||||
"Data successfully updated!","Data successfully updated!"
|
||||
"You removed {p_out} % of observations.","You removed {p_out} % of observations."
|
||||
"You removed {p_out} % of variables.","You removed {p_out} % of variables."
|
||||
"There is a total of {p_miss} % missing observations.","There is a total of {p_miss} % missing observations."
|
||||
"There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}.","There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}."
|
||||
"Data includes {n_pairs} pairs of highly correlated variables.","Data includes {n_pairs} pairs of highly correlated variables."
|
||||
"Class","Class"
|
||||
"Observations","Observations"
|
||||
"File upload","File upload"
|
||||
"REDCap server export","REDCap server export"
|
||||
"Local or sample data","Local or sample data"
|
||||
"Data is only stored for analyses and deleted when the app is closed.","Data is only stored for analyses and deleted when the app is closed."
|
||||
"Consider [running ***FreesearchR*** locally](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine) if working with sensitive data.","Consider [running ***FreesearchR*** locally](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine) if working with sensitive data."
|
||||
"Documentation","Documentation"
|
||||
"Feedback","Feedback"
|
||||
"License: AGPLv3","License: AGPLv3"
|
||||
"Source","Source"
|
||||
"Settings","Settings"
|
||||
"The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine).","The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine)."
|
||||
"Data classes and missing observations","Data classes and missing observations"
|
||||
"We encountered the following error showing missingness:","We encountered the following error showing missingness:"
|
||||
"Please confirm data reset!","Please confirm data reset!"
|
||||
"Sure you want to reset data? This cannot be undone.","Sure you want to reset data? This cannot be undone."
|
||||
"Confirm","Confirm"
|
||||
"The filtered data","The filtered data"
|
||||
"Create new factor","Create new factor"
|
||||
"This window is aimed at advanced users and require some *R*-experience!","This window is aimed at advanced users and require some *R*-experience!"
|
||||
"Create new variables","Create new variables"
|
||||
"Select data types to include","Select data types to include"
|
||||
"Uploaded data overview","Uploaded data overview"
|
||||
"We encountered the following error browsing your data:","We encountered the following error browsing your data:"
|
||||
"Here is an overview of how your data is interpreted, and where data is missing. Use this information to consider if data is missing at random or if some observations are missing systematically wich may be caused by an observation bias.","Here is an overview of how your data is interpreted, and where data is missing. Use this information to consider if data is missing at random or if some observations are missing systematically wich may be caused by an observation bias."
|
||||
"Data import","Data import"
|
||||
"Data import formatting","Data import formatting"
|
||||
"Data modifications","Data modifications"
|
||||
"Variables filter","Variables filter"
|
||||
"Data filter","Data filter"
|
||||
"Data characteristics table","Data characteristics table"
|
||||
"The dataset without text variables","The dataset without text variables"
|
||||
"The data includes {n_col} variables. Please limit to 100.","The data includes {n_col} variables. Please limit to 100."
|
||||
"Creating the table. Hold on for a moment..","Creating the table. Hold on for a moment.."
|
||||
"Select variable to stratify analysis","Select variable to stratify analysis"
|
||||
"Generating the report. Hold on for a moment..","Generating the report. Hold on for a moment.."
|
||||
"We encountered the following error creating your report:","We encountered the following error creating your report:"
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.","There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data."
|
||||
|
311
app_docker/translations/translation_sv.csv
Normal file
311
app_docker/translations/translation_sv.csv
Normal file
|
|
@ -0,0 +1,311 @@
|
|||
"en","sv"
|
||||
"Hello","Hei"
|
||||
"The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent.","The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent."
|
||||
"No variables have a correlation measure above the threshold.","No variables have a correlation measure above the threshold."
|
||||
"and","and"
|
||||
"The following error occured on determining correlations:","The following error occured on determining correlations:"
|
||||
"from each pair","from each pair"
|
||||
"New column name:","New column name:"
|
||||
"Group calculation by:","Group calculation by:"
|
||||
"Enter an expression to define new column:","Enter an expression to define new column:"
|
||||
"Click on a column name to add it to the expression:","Click on a column name to add it to the expression:"
|
||||
"Create column","Create column"
|
||||
"Cancel","Cancel"
|
||||
"Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything.","Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything."
|
||||
"New column name cannot be empty","New column name cannot be empty"
|
||||
"Create a new column","Create a new column"
|
||||
"Some operations are not allowed","Some operations are not allowed"
|
||||
"Column added!","Column added!"
|
||||
"Unique values:","Unique values:"
|
||||
"Variable to cut:","Variable to cut:"
|
||||
"Close intervals on the right","Close intervals on the right"
|
||||
"Include lowest value","Include lowest value"
|
||||
"Create factor variable","Create factor variable"
|
||||
"Fixed breaks:","Fixed breaks:"
|
||||
"Method:","Method:"
|
||||
"Other","Other"
|
||||
"Convert Numeric to Factor","Convert Numeric to Factor"
|
||||
"Hour of the day","Hour of the day"
|
||||
"Breaks","Breaks"
|
||||
"By day of the week","By day of the week"
|
||||
"By weekday","By weekday"
|
||||
"By week number and year","By week number and year"
|
||||
"By week number","By week number"
|
||||
"By month and year","By month and year"
|
||||
"By month only","By month only"
|
||||
"By quarter of the year","By quarter of the year"
|
||||
"By year","By year"
|
||||
"Keep only most common","Keep only most common"
|
||||
"Number","Number"
|
||||
"Combine below percentage","Combine below percentage"
|
||||
"Percentage","Percentage"
|
||||
"By specified numbers","By specified numbers"
|
||||
"By quantiles (groups of equal size)","By quantiles (groups of equal size)"
|
||||
"Only non-text variables are available for plotting. Go the ""Data"" to reclass data to plot.","Only non-text variables are available for plotting. Go the ""Data"" to reclass data to plot."
|
||||
"Plot","Plot"
|
||||
"Adjust settings, then press ""Plot"".","Adjust settings, then press ""Plot""."
|
||||
"Plot height (mm)","Plot height (mm)"
|
||||
"Plot width (mm)","Plot width (mm)"
|
||||
"File format","File format"
|
||||
"Download plot","Download plot"
|
||||
"Create plot","Create plot"
|
||||
"Download","Download"
|
||||
"Select variable","Select variable"
|
||||
"Response variable","Response variable"
|
||||
"Plot type","Plot type"
|
||||
"Please select","Please select"
|
||||
"Additional variables","Additional variables"
|
||||
"Secondary variable","Secondary variable"
|
||||
"No variable","No variable"
|
||||
"Grouping variable","Grouping variable"
|
||||
"No stratification","No stratification"
|
||||
"Drawing the plot. Hold tight for a moment..","Drawing the plot. Hold tight for a moment.."
|
||||
"#Plotting\n","#Plotting\n"
|
||||
"Stacked horizontal bars","Stacked horizontal bars"
|
||||
"A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars","A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars"
|
||||
"Violin plot","Violin plot"
|
||||
"A modern alternative to the classic boxplot to visualise data distribution","A modern alternative to the classic boxplot to visualise data distribution"
|
||||
"Sankey plot","Sankey plot"
|
||||
"A way of visualising change between groups","A way of visualising change between groups"
|
||||
"Scatter plot","Scatter plot"
|
||||
"A classic way of showing the association between to variables","A classic way of showing the association between to variables"
|
||||
"Box plot","Box plot"
|
||||
"A classic way to plot data distribution by groups","A classic way to plot data distribution by groups"
|
||||
"Euler diagram","Euler diagram"
|
||||
"Generate area-proportional Euler diagrams to display set relationships","Generate area-proportional Euler diagrams to display set relationships"
|
||||
"Unique:","Unique:"
|
||||
"Missing:","Missing:"
|
||||
"Most Common:","Most Common:"
|
||||
"Min:","Min:"
|
||||
"Mean:","Mean:"
|
||||
"Median:","Median:"
|
||||
"Max:","Max:"
|
||||
"{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases.","{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases."
|
||||
"Import a dataset from an environment","Import a dataset from an environment"
|
||||
"Select a data source:","Select a data source:"
|
||||
"Select source","Select source"
|
||||
"Select a dataset:","Select a dataset:"
|
||||
"List of datasets...","List of datasets..."
|
||||
"No data selected!","No data selected!"
|
||||
"Use a dataset from your environment or from the environment of a package.","Use a dataset from your environment or from the environment of a package."
|
||||
"No dataset here...","No dataset here..."
|
||||
"Imported data","Imported data"
|
||||
"Not a data.frame","Not a data.frame"
|
||||
"Rows to skip before reading data:","Rows to skip before reading data:"
|
||||
"Missing values character(s):","Missing values character(s):"
|
||||
"if several use a comma (',') to separate them","if several use a comma (',') to separate them"
|
||||
"Decimal separator:","Decimal separator:"
|
||||
"Encoding:","Encoding:"
|
||||
"Upload a file:","Upload a file:"
|
||||
"Browse...","Browse..."
|
||||
"Select sheet to import:","Select sheet to import:"
|
||||
"No file selected.","No file selected."
|
||||
"You can choose between these file types:","You can choose between these file types:"
|
||||
"You can import {file_extensions_text} files","You can import {file_extensions_text} files"
|
||||
"First five rows are shown below:","First five rows are shown below:"
|
||||
"No missing observations","No missing observations"
|
||||
"Grouped by {get_label(data,ter)}","Grouped by {get_label(data,ter)}"
|
||||
"Import data from REDCap","Import data from REDCap"
|
||||
"REDCap server","REDCap server"
|
||||
"Web address","Web address"
|
||||
"Format should be either 'https://redcap.your.institution/' or 'https://your.institution/redcap/'","Format should be either 'https://redcap.your.institution/' or 'https://your.institution/redcap/'"
|
||||
"API token","API token"
|
||||
"The token is a string of 32 numbers and letters.","The token is a string of 32 numbers and letters."
|
||||
"Connect","Connect"
|
||||
"Please fill in web address and API token, then press 'Connect'.","Please fill in web address and API token, then press 'Connect'."
|
||||
"Data import parameters","Data import parameters"
|
||||
"Select fields/variables to import and click the funnel to apply optional filters","Select fields/variables to import and click the funnel to apply optional filters"
|
||||
"Import","Import"
|
||||
"Click to see data dictionary","Click to see data dictionary"
|
||||
"Connected to server!","Connected to server!"
|
||||
"The {data_rv$info$project_title} project is loaded.","The {data_rv$info$project_title} project is loaded."
|
||||
"Data dictionary","Data dictionary"
|
||||
"Preview:","Preview:"
|
||||
"Imported data set","Imported data set"
|
||||
"Select fields/variables to import:","Select fields/variables to import:"
|
||||
"Specify the data format","Specify the data format"
|
||||
"Fill missing values?","Fill missing values?"
|
||||
"Requested data was retrieved!","Requested data was retrieved!"
|
||||
"Data retrieved, but it looks like only the ID was retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access.","Data retrieved, but it looks like only the ID was retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access."
|
||||
"Data retrieved, but it looks like not all requested fields were retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access.","Data retrieved, but it looks like not all requested fields were retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access."
|
||||
"Click to see the imported data","Click to see the imported data"
|
||||
"Regression table","Regression table"
|
||||
"Regression","Regression"
|
||||
"Specify covariables","Specify covariables"
|
||||
"If none are selected, all are included.","If none are selected, all are included."
|
||||
"Analyse","Analyse"
|
||||
"Working...","Working..."
|
||||
"Press 'Analyse' to create the regression model and after changing parameters.","Press 'Analyse' to create the regression model and after changing parameters."
|
||||
"Coefficient plot","Coefficient plot"
|
||||
"Model checks","Model checks"
|
||||
"Coefficients plot","Coefficients plot"
|
||||
"Checks","Checks"
|
||||
"Yes","Yes"
|
||||
"No","No"
|
||||
"Show p-value","Show p-value"
|
||||
"Select outcome variable","Select outcome variable"
|
||||
"Choose regression analysis","Choose regression analysis"
|
||||
"Covariables to format as categorical","Covariables to format as categorical"
|
||||
"Select variable to stratify baseline","Select variable to stratify baseline"
|
||||
"Select models to plot","Select models to plot"
|
||||
"Creating regression models failed with the following error:","Creating regression models failed with the following error:"
|
||||
"Creating a regression table failed with the following error:","Creating a regression table failed with the following error:"
|
||||
"Saving the plot. Hold on for a moment..","Saving the plot. Hold on for a moment.."
|
||||
"Running model assumptions checks failed with the following error:","Running model assumptions checks failed with the following error:"
|
||||
"Select checks to plot","Select checks to plot"
|
||||
"Multivariable regression model checks","Multivariable regression model checks"
|
||||
"www/intro.html","www/intro.html"
|
||||
"www/intro.md","www/intro.md"
|
||||
"Get started","Get started"
|
||||
"Choose your data","Choose your data"
|
||||
"Upload a file, get data directly from REDCap or use local or sample data.","Upload a file, get data directly from REDCap or use local or sample data."
|
||||
"Please be mindfull handling sensitive data","Please be mindfull handling sensitive data"
|
||||
"<p>The <em><strong>FreesearchR</strong></em> app only stores data for analyses, but please only use with sensitive data when running locally. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Read more here</a></p>","<p>The <em><strong>FreesearchR</strong></em> app only stores data for analyses, but please only use with sensitive data when running locally. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Read more here</a></p>"
|
||||
"Quick overview","Quick overview"
|
||||
"Select variables for final import","Select variables for final import"
|
||||
"Exclude incomplete variables:","Exclude incomplete variables:"
|
||||
"At 0, only complete variables are included; at 100, all variables are included.","At 0, only complete variables are included; at 100, all variables are included."
|
||||
"Manual selection:","Manual selection:"
|
||||
"Let's begin!","Let's begin!"
|
||||
"Prepare","Prepare"
|
||||
"Overview and filter","Overview and filter"
|
||||
"Overview and filtering","Overview and filtering"
|
||||
"Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse observations and apply different data filters.","Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse observations and apply different data filters."
|
||||
"Visual overview","Visual overview"
|
||||
"Browse observations","Browse observations"
|
||||
"Filter data types","Filter data types"
|
||||
"Filter observations","Filter observations"
|
||||
"Apply filter on observation","Apply filter on observation"
|
||||
"Edit and create data","Edit and create data"
|
||||
"Subset, rename and convert variables","Subset, rename and convert variables"
|
||||
"Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.).","Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.)."
|
||||
"Please note that data modifications are applied before any filtering.","Please note that data modifications are applied before any filtering."
|
||||
"Advanced data manipulation","Advanced data manipulation"
|
||||
"Below options allow more advanced varaible manipulations.","Below options allow more advanced varaible manipulations."
|
||||
"Reorder factor levels","Reorder factor levels"
|
||||
"Reorder the levels of factor/categorical variables.","Reorder the levels of factor/categorical variables."
|
||||
"New factor","New factor"
|
||||
"Create factor/categorical variable from a continous variable (number/date/time).","Create factor/categorical variable from a continous variable (number/date/time)."
|
||||
"New variable","New variable"
|
||||
"Create a new variable based on an R-expression.","Create a new variable based on an R-expression."
|
||||
"Compare modified data to original","Compare modified data to original"
|
||||
"Raw print of the original vs the modified data.","Raw print of the original vs the modified data."
|
||||
"Original data:","Original data:"
|
||||
"Modified data:","Modified data:"
|
||||
"Restore original data","Restore original data"
|
||||
"Reset to original imported dataset. Careful! There is no un-doing.","Reset to original imported dataset. Careful! There is no un-doing."
|
||||
"Evaluate","Evaluate"
|
||||
"Characteristics","Characteristics"
|
||||
"Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list.","Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list."
|
||||
"Compare strata?","Compare strata?"
|
||||
"Option to perform statistical comparisons between strata in baseline table.","Option to perform statistical comparisons between strata in baseline table."
|
||||
"Press 'Evaluate' to create the comparison table.","Press 'Evaluate' to create the comparison table."
|
||||
"Correlations","Correlations"
|
||||
"To avoid evaluating the correlation of the outcome variable, this can be excluded from the plot or select 'none'.","To avoid evaluating the correlation of the outcome variable, this can be excluded from the plot or select 'none'."
|
||||
"Correlation cut-off","Correlation cut-off"
|
||||
"Set the cut-off for considered 'highly correlated'.","Set the cut-off for considered 'highly correlated'."
|
||||
"Missings","Missings"
|
||||
"Visuals","Visuals"
|
||||
"Analysis validation","Analysis validation"
|
||||
"Report","Report"
|
||||
"Choose your favourite output file format for further work, and download, when the analyses are done.","Choose your favourite output file format for further work, and download, when the analyses are done."
|
||||
"Factor variable to reorder:","Factor variable to reorder:"
|
||||
"Sort by levels","Sort by levels"
|
||||
"Sort by count","Sort by count"
|
||||
"Create a new variable (otherwise replaces the one selected)","Create a new variable (otherwise replaces the one selected)"
|
||||
"Update factor variable","Update factor variable"
|
||||
"Sort count","Sort count"
|
||||
"Levels","Levels"
|
||||
"Count","Count"
|
||||
"Update levels of a factor","Update levels of a factor"
|
||||
"Update & select variables","Update & select variables"
|
||||
"Date format:","Date format:"
|
||||
"Date to use as origin to convert date/datetime:","Date to use as origin to convert date/datetime:"
|
||||
"Apply changes","Apply changes"
|
||||
"No data to display.","No data to display."
|
||||
"Data successfully updated!","Data successfully updated!"
|
||||
"You removed {p_out} % of observations.","You removed {p_out} % of observations."
|
||||
"You removed {p_out} % of variables.","You removed {p_out} % of variables."
|
||||
"There is a total of {p_miss} % missing observations.","There is a total of {p_miss} % missing observations."
|
||||
"Data includes {n_pairs} pairs of highly correlated variables.","Data includes {n_pairs} pairs of highly correlated variables."
|
||||
"Class","Class"
|
||||
"Observations","Observations"
|
||||
"File upload","File upload"
|
||||
"REDCap server export","REDCap server export"
|
||||
"Local or sample data","Local or sample data"
|
||||
"Data is only stored for analyses and deleted when the app is closed.","Data is only stored for analyses and deleted when the app is closed."
|
||||
"Consider [running ***FreesearchR*** locally](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine) if working with sensitive data.","Consider [running ***FreesearchR*** locally](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine) if working with sensitive data."
|
||||
"Documentation","Documentation"
|
||||
"Feedback","Feedback"
|
||||
"License: AGPLv3","License: AGPLv3"
|
||||
"Source","Source"
|
||||
"Settings","Settings"
|
||||
"The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine).","The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine)."
|
||||
"Data classes and missing observations","Data classes and missing observations"
|
||||
"We encountered the following error showing missingness:","We encountered the following error showing missingness:"
|
||||
"Please confirm data reset!","Please confirm data reset!"
|
||||
"Sure you want to reset data? This cannot be undone.","Sure you want to reset data? This cannot be undone."
|
||||
"Confirm","Confirm"
|
||||
"The filtered data","The filtered data"
|
||||
"Create new factor","Create new factor"
|
||||
"This window is aimed at advanced users and require some *R*-experience!","This window is aimed at advanced users and require some *R*-experience!"
|
||||
"Create new variables","Create new variables"
|
||||
"Select data types to include","Select data types to include"
|
||||
"Uploaded data overview","Uploaded data overview"
|
||||
"We encountered the following error browsing your data:","We encountered the following error browsing your data:"
|
||||
"Here is an overview of how your data is interpreted, and where data is missing. Use this information to consider if data is missing at random or if some observations are missing systematically wich may be caused by an observation bias.","Here is an overview of how your data is interpreted, and where data is missing. Use this information to consider if data is missing at random or if some observations are missing systematically wich may be caused by an observation bias."
|
||||
"Data import","Data import"
|
||||
"Data import formatting","Data import formatting"
|
||||
"Data modifications","Data modifications"
|
||||
"Variables filter","Variables filter"
|
||||
"Data filter","Data filter"
|
||||
"Data characteristics table","Data characteristics table"
|
||||
"The dataset without text variables","The dataset without text variables"
|
||||
"The data includes {n_col} variables. Please limit to 100.","The data includes {n_col} variables. Please limit to 100."
|
||||
"Creating the table. Hold on for a moment..","Creating the table. Hold on for a moment.."
|
||||
"Generating the report. Hold on for a moment..","Generating the report. Hold on for a moment.."
|
||||
"We encountered the following error creating your report:","We encountered the following error creating your report:"
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.","There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data."
|
||||
"Text or character to split string by","Text or character to split string by"
|
||||
"Split the variable","Split the variable"
|
||||
"Variable to split:","Variable to split:"
|
||||
"Direction:","Direction:"
|
||||
"Split string to multiple columns. Keep number of rows.","Split string to multiple columns. Keep number of rows."
|
||||
"Split string to multiple observations (rows) in the same column. Also ads id and instance columns","Split string to multiple observations (rows) in the same column. Also ads id and instance columns"
|
||||
"Split character string","Split character string"
|
||||
"Split text","Split text"
|
||||
"Split a character string by a common delimiter","Split a character string by a common delimiter"
|
||||
"Select delimiter","Select delimiter"
|
||||
"Browse data preview","Browse data preview"
|
||||
"Original data","Original data"
|
||||
"Preview of result","Preview of result"
|
||||
"No character variables with accepted delimiters detected.","No character variables with accepted delimiters detected."
|
||||
"Split a text column by a recognised delimiter.","Split a text column by a recognised delimiter."
|
||||
"Apply split","Apply split"
|
||||
"Stacked relative barplot","Stacked relative barplot"
|
||||
"Create relative stacked barplots to show the distribution of categorical levels","Create relative stacked barplots to show the distribution of categorical levels"
|
||||
"Side-by-side barplot","Side-by-side barplot"
|
||||
"Create side-by-side barplot to show the distribution of categorical levels","Create side-by-side barplot to show the distribution of categorical levels"
|
||||
"Select table theme","Select table theme"
|
||||
"Level of detail","Level of detail"
|
||||
"Minimal","Minimal"
|
||||
"Extensive","Extensive"
|
||||
"Letters","Letters"
|
||||
"Words","Words"
|
||||
"Shorten to first letters","Shorten to first letters"
|
||||
"Shorten to first words","Shorten to first words"
|
||||
"Missings across variables by the variable **'{input$missings_var}'**","Missings across variables by the variable **'{input$missings_var}'**"
|
||||
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Missing vs non-missing observations in the variable **'{input$missings_var}'**"
|
||||
"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.","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."
|
||||
"Calculating. Hold tight for a moment..","Calculating. Hold tight for a moment.."
|
||||
"Overview of missing observations","Overview of missing observations"
|
||||
"Analysis method for missingness overview","Analysis method for missingness overview"
|
||||
"Overview of missings across variables","Overview of missings across variables"
|
||||
"Overview of difference in variables by missing status in outcome","Overview of difference in variables by missing status in outcome"
|
||||
"Select a variable for grouped overview","Select a variable for grouped overview"
|
||||
"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,31 +1,30 @@
|
|||
"en","sw"
|
||||
"Hello","Habari"
|
||||
"Get started","Get started"
|
||||
"File upload","File upload"
|
||||
"REDCap server export","REDCap server export"
|
||||
"Local or sample data","Local or sample data"
|
||||
"Please be mindfull handling sensitive data","Please be mindfull handling sensitive data"
|
||||
"The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine).","The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine)."
|
||||
"Quick overview","Quick overview"
|
||||
"Select variables for final import","Select variables for final import"
|
||||
"Exclude incomplete variables:","Exclude incomplete variables:"
|
||||
"Manual selection:","Manual selection:"
|
||||
"Let's begin!","Let's begin!"
|
||||
"Analysis validation","Analysis validation"
|
||||
"Report","Report"
|
||||
"Choose your favourite output file format for further work, and download, when the analyses are done.","Choose your favourite output file format for further work, and download, when the analyses are done."
|
||||
"Get started","Tuanze"
|
||||
"File upload","Upakiaji wa faili"
|
||||
"REDCap server export","Uhamishaji wa seva ya REDCap"
|
||||
"Local or sample data","Taarifa za ndani au za mfano"
|
||||
"Please be mindfull handling sensitive data","Tafadhali kumbuka kushughulikia data nyeti"
|
||||
"The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine).","Programu ya ***FreesearchR*** huhifadhi data kwa uchanganuzi pekee, lakini tafadhali tumia tu na data nyeti unapoendesha ndani ya nchi. [Soma zaidi hapa](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine)."
|
||||
"Quick overview","Muhtasari wa haraka"
|
||||
"Select variables for final import","Chagua vigeu kwa ajili ya uingizaji wa mwisho"
|
||||
"Exclude incomplete variables:","Usijumuishe vigeu visivyokamilika:"
|
||||
"Manual selection:","Uchaguzi wa mikono:"
|
||||
"Let's begin!","Tuanze!"
|
||||
"Analysis validation","Uthibitishaji wa uchambuzi"
|
||||
"Report","Ripoti"
|
||||
"Choose your favourite output file format for further work, and download, when the analyses are done.","Chagua umbizo la faili la towe lako kwa kazi zaidi, na upakue, uchanganuzi utakapofanywa."
|
||||
"www/intro.html","www/intro_sw.html"
|
||||
"<p>The <em><strong>FreesearchR</strong></em> app only stores data for analyses, but please only use with sensitive data when running locally. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Read more here</a></p>","<p>The <em><strong>FreesearchR</strong></em> app only stores data for analyses, but please only use with sensitive data when running locally. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Read more here</a></p>"
|
||||
"Overview and filter","Overview and filter"
|
||||
"Overview and filtering","Overview and filtering"
|
||||
"Visual overview","Visual overview"
|
||||
"Filter data types","Filter data types"
|
||||
"Filter observations","Filter observations"
|
||||
"Apply filter on observation","Apply filter on observation"
|
||||
"<p>The <em><strong>FreesearchR</strong></em> app only stores data for analyses, but please only use with sensitive data when running locally. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Read more here</a></p>","<p>Programu ya <em><strong>FreesearchR</strong></em> huhifadhi data kwa ajili ya uchanganuzi pekee, lakini tafadhali tumia tu na data nyeti unapoendesha ndani ya nchi. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Soma zaidi hapa</a></p>"
|
||||
"Overview and filter","Muhtasari na chujio"
|
||||
"Overview and filtering","Muhtasari na uchujaji"
|
||||
"Visual overview","Muhtasari wa kuona"
|
||||
"Filter data types","Chuja aina za data"
|
||||
"Filter observations","Chuja uchunguzi"
|
||||
"Apply filter on observation","Tumia kichujio unapotazama"
|
||||
"Edit and create data","Edit and create data"
|
||||
"Subset, rename and convert variables","Subset, rename and convert variables"
|
||||
"Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.).","Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.)."
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from a continous variable or new variables with R code. At the bottom you can restore the original data.","There are more advanced options to modify factor/categorical variables as well as create new factor from a continous variable or new variables with R code. At the bottom you can restore the original data."
|
||||
"Please note that data modifications are applied before any filtering.","Please note that data modifications are applied before any filtering."
|
||||
"Advanced data manipulation","Advanced data manipulation"
|
||||
"Below options allow more advanced varaible manipulations.","Below options allow more advanced varaible manipulations."
|
||||
|
|
@ -37,8 +36,8 @@
|
|||
"Create a new variable based on an R-expression.","Create a new variable based on an R-expression."
|
||||
"Compare modified data to original","Compare modified data to original"
|
||||
"Raw print of the original vs the modified data.","Raw print of the original vs the modified data."
|
||||
"Original data:","Original data:"
|
||||
"Modified data:","Modified data:"
|
||||
"Original data:","Data asili:"
|
||||
"Modified data:","Data iliyobadilishwa:"
|
||||
"New column name:","New column name:"
|
||||
"Group calculation by:","Group calculation by:"
|
||||
"Enter an expression to define new column:","Enter an expression to define new column:"
|
||||
|
|
@ -50,7 +49,6 @@
|
|||
"Column added!","Column added!"
|
||||
"Unique values:","Unique values:"
|
||||
"Variable to cut:","Variable to cut:"
|
||||
"Number of breaks:","Number of breaks:"
|
||||
"Close intervals on the right","Close intervals on the right"
|
||||
"Include lowest value","Include lowest value"
|
||||
"Create factor variable","Create factor variable"
|
||||
|
|
@ -152,10 +150,7 @@
|
|||
"Settings","Settings"
|
||||
"The following error occured on determining correlations:","The following error occured on determining correlations:"
|
||||
"We encountered the following error creating your report:","We encountered the following error creating your report:"
|
||||
"No variable chosen for analysis","No variable chosen for analysis"
|
||||
"No missing observations","No missing observations"
|
||||
"Missing vs non-missing observations in the variable **'{variabler()}'**","Missing vs non-missing observations in the variable **'{variabler()}'**"
|
||||
"There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}.","There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}."
|
||||
"There is a total of {p_miss} % missing observations.","There is a total of {p_miss} % missing observations."
|
||||
"Median:","Median:"
|
||||
"Restore original data","Restore original data"
|
||||
|
|
@ -248,10 +243,69 @@
|
|||
"Data characteristics table","Data characteristics table"
|
||||
"The dataset without text variables","The dataset without text variables"
|
||||
"Creating the table. Hold on for a moment..","Creating the table. Hold on for a moment.."
|
||||
"Select variable to stratify analysis","Select variable to stratify analysis"
|
||||
"Generating the report. Hold on for a moment..","Generating the report. Hold on for a moment.."
|
||||
"We encountered the following error showing missingness:","We encountered the following error showing missingness:"
|
||||
"We encountered the following error browsing your data:","We encountered the following error browsing your data:"
|
||||
"To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random.","To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random."
|
||||
"Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything.","Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything."
|
||||
"Other","Other"
|
||||
"Hour of the day","Hour of the day"
|
||||
"Breaks","Breaks"
|
||||
"By day of the week","By day of the week"
|
||||
"By weekday","By weekday"
|
||||
"By week number and year","By week number and year"
|
||||
"By week number","By week number"
|
||||
"By month and year","By month and year"
|
||||
"By month only","By month only"
|
||||
"By quarter of the year","By quarter of the year"
|
||||
"By year","By year"
|
||||
"Keep only most common","Keep only most common"
|
||||
"Number","Number"
|
||||
"Combine below percentage","Combine below percentage"
|
||||
"Percentage","Percentage"
|
||||
"By specified numbers","By specified numbers"
|
||||
"By quantiles (groups of equal size)","By quantiles (groups of equal size)"
|
||||
"Please fill in web address and API token, then press 'Connect'.","Please fill in web address and API token, then press 'Connect'."
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.","There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data."
|
||||
"Text or character to split string by","Text or character to split string by"
|
||||
"Split the variable","Split the variable"
|
||||
"Variable to split:","Variable to split:"
|
||||
"Direction:","Direction:"
|
||||
"Split string to multiple columns. Keep number of rows.","Split string to multiple columns. Keep number of rows."
|
||||
"Split string to multiple observations (rows) in the same column. Also ads id and instance columns","Split string to multiple observations (rows) in the same column. Also ads id and instance columns"
|
||||
"Split character string","Split character string"
|
||||
"Split text","Split text"
|
||||
"Split a character string by a common delimiter","Split a character string by a common delimiter"
|
||||
"Select delimiter","Select delimiter"
|
||||
"Browse data preview","Browse data preview"
|
||||
"Original data","Original data"
|
||||
"Preview of result","Preview of result"
|
||||
"No character variables with accepted delimiters detected.","No character variables with accepted delimiters detected."
|
||||
"Split a text column by a recognised delimiter.","Split a text column by a recognised delimiter."
|
||||
"Apply split","Apply split"
|
||||
"Stacked relative barplot","Stacked relative barplot"
|
||||
"Create relative stacked barplots to show the distribution of categorical levels","Create relative stacked barplots to show the distribution of categorical levels"
|
||||
"Side-by-side barplot","Side-by-side barplot"
|
||||
"Create side-by-side barplot to show the distribution of categorical levels","Create side-by-side barplot to show the distribution of categorical levels"
|
||||
"Select table theme","Select table theme"
|
||||
"Level of detail","Level of detail"
|
||||
"Minimal","Minimal"
|
||||
"Extensive","Extensive"
|
||||
"Letters","Letters"
|
||||
"Words","Words"
|
||||
"Shorten to first letters","Shorten to first letters"
|
||||
"Shorten to first words","Shorten to first words"
|
||||
"Missings across variables by the variable **'{input$missings_var}'**","Missings across variables by the variable **'{input$missings_var}'**"
|
||||
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Missing vs non-missing observations in the variable **'{input$missings_var}'**"
|
||||
"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.","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."
|
||||
"Calculating. Hold tight for a moment..","Calculating. Hold tight for a moment.."
|
||||
"Overview of missing observations","Overview of missing observations"
|
||||
"Analysis method for missingness overview","Analysis method for missingness overview"
|
||||
"Overview of missings across variables","Overview of missings across variables"
|
||||
"Overview of difference in variables by missing status in outcome","Overview of difference in variables by missing status in outcome"
|
||||
"Select a variable for grouped overview","Select a variable for grouped overview"
|
||||
"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"
|
||||
|
|
|
|||
|
|
|
@ -91,3 +91,12 @@ $(document).on('focus', '.smart-dropdown .selectize-control input', function() {
|
|||
}
|
||||
});
|
||||
|
||||
// window.addEventListener('beforeunload', function (e) {
|
||||
// // Cancel the event
|
||||
// e.preventDefault();
|
||||
// // Chrome requires returnValue to be set
|
||||
// e.returnValue = '';
|
||||
// // Some browsers display this message, others show a generic one
|
||||
// return 'Are you sure you want to leave? Any unsaved changes will be lost.';
|
||||
// });
|
||||
|
||||
|
|
|
|||
54
examples/string_split_demo.R
Normal file
54
examples/string_split_demo.R
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
library(shiny)
|
||||
library(reactable)
|
||||
|
||||
ui <- fluidPage(
|
||||
theme = bslib::bs_theme(version = 5L, preset = "bootstrap"),
|
||||
shinyWidgets::html_dependency_winbox(),
|
||||
tags$h2("Split string"),
|
||||
fluidRow(
|
||||
column(
|
||||
width = 4,
|
||||
actionButton("modal", "Or click here to open a modal to create a column")
|
||||
),
|
||||
column(
|
||||
width = 8,
|
||||
reactableOutput(outputId = "table"),
|
||||
verbatimTextOutput("code")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
server <- function(input, output, session) {
|
||||
rv <- reactiveValues(
|
||||
data = MASS::Cars93[, c(1, 3, 4, 5, 6, 10)],
|
||||
out = NULL
|
||||
)
|
||||
|
||||
# modal window mode
|
||||
observeEvent(input$modal, modal_string_split("modal"))
|
||||
|
||||
rv$out <- create_column_server(
|
||||
id = "modal",
|
||||
data_r = reactive(rv$data)
|
||||
)
|
||||
|
||||
|
||||
# Show result
|
||||
output$table <- renderReactable({
|
||||
data <- req(rv$data)
|
||||
reactable(
|
||||
data = data,
|
||||
bordered = TRUE,
|
||||
compact = TRUE,
|
||||
striped = TRUE
|
||||
)
|
||||
})
|
||||
|
||||
output$code <- renderPrint({
|
||||
attr(rv$data, "code")
|
||||
})
|
||||
}
|
||||
|
||||
if (interactive()) {
|
||||
shinyApp(ui, server)
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -91,3 +91,12 @@ $(document).on('focus', '.smart-dropdown .selectize-control input', function() {
|
|||
}
|
||||
});
|
||||
|
||||
// window.addEventListener('beforeunload', function (e) {
|
||||
// // Cancel the event
|
||||
// e.preventDefault();
|
||||
// // Chrome requires returnValue to be set
|
||||
// e.returnValue = '';
|
||||
// // Some browsers display this message, others show a generic one
|
||||
// return 'Are you sure you want to leave? Any unsaved changes will be lost.';
|
||||
// });
|
||||
|
||||
|
|
|
|||
|
|
@ -91,3 +91,12 @@ $(document).on('focus', '.smart-dropdown .selectize-control input', function() {
|
|||
}
|
||||
});
|
||||
|
||||
// window.addEventListener('beforeunload', function (e) {
|
||||
// // Cancel the event
|
||||
// e.preventDefault();
|
||||
// // Chrome requires returnValue to be set
|
||||
// e.returnValue = '';
|
||||
// // Some browsers display this message, others show a generic one
|
||||
// return 'Are you sure you want to leave? Any unsaved changes will be lost.';
|
||||
// });
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
"Edit and create data","Ændr og opret variabler"
|
||||
"Subset, rename and convert variables","Udvælg, omdøb og konverter variabler"
|
||||
"Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.).","Nedenfor er der mulighed for at lave simple ændringer i dit datasæt, såsom at redigere variabelnavne eller beskrivelser (bedre tabeller), eller omklassificering af variabler (numerisk, factoriel/kategorisk)."
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from a continous variable or new variables with R code. At the bottom you can restore the original data.","Her er mere avancerede muligheder for at ændre faktorielle/kategoriske data, danne nye faktorielle variabler fra kontinuerte eller komplet nye baseret på R-kode. Nederst har du mulighed for at gendanne data."
|
||||
"Please note that data modifications are applied before any filtering.","Bemærk at alle ændringer i data anvendes inden filtreringen."
|
||||
"Advanced data manipulation","Avanceret datamanipulation"
|
||||
"Below options allow more advanced varaible manipulations.","Nedenfor er mulighed for avancerede ændringer i data."
|
||||
|
|
@ -50,7 +49,6 @@
|
|||
"Column added!","Variabel oprettet!"
|
||||
"Unique values:","Unikke værdier:"
|
||||
"Variable to cut:","Variabel, der skal deles:"
|
||||
"Number of breaks:","Antal niveauer:"
|
||||
"Close intervals on the right","Luk intervaller til højre"
|
||||
"Include lowest value","Inkluderer den laveste værdi"
|
||||
"Create factor variable","Opret kategorisk variabel"
|
||||
|
|
@ -152,10 +150,7 @@
|
|||
"Settings","Indstillinger"
|
||||
"The following error occured on determining correlations:","Følgende fejl opstod i forbindelse med korrelationsanalysen:"
|
||||
"We encountered the following error creating your report:","Følgende fejl opstod, da rapporten blev dannet:"
|
||||
"No variable chosen for analysis","Ingen variabel er valgt til analysen"
|
||||
"No missing observations","Ingen manglende observationer"
|
||||
"Missing vs non-missing observations in the variable **'{variabler()}'**","Manglende vs ikke-manglende observationer i variablen **'{variabler()}'**"
|
||||
"There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}.","Der er en betydelig korrelation blandt {n_nonmcar} variabler sammenlignet efter manglende observationer i {outcome}."
|
||||
"There is a total of {p_miss} % missing observations.","Der er i alt {p_miss} % manglende observationer."
|
||||
"Median:","Median:"
|
||||
"Restore original data","Gendan originale data"
|
||||
|
|
@ -248,10 +243,69 @@
|
|||
"Data characteristics table","Oversigtstabel"
|
||||
"The dataset without text variables","Datasættet uden variabler formateret som tekst"
|
||||
"Creating the table. Hold on for a moment..","Opretter tabellen. Vent et øjeblik.."
|
||||
"Select variable to stratify analysis","Vælg variabler til at stratificere analysen"
|
||||
"Generating the report. Hold on for a moment..","Opretter rapporten. Vent et øjeblik.."
|
||||
"We encountered the following error showing missingness:","Under analysen af manglende observationer opstod følgende fejl:"
|
||||
"We encountered the following error browsing your data:","I forsøget på at vise en dataoversigt opstod følgende fejl:"
|
||||
"To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random.","Vælg svarvariablen, for at få hjælp til at vurdere om manglende observationer manglende tilfældigt eller ej (kun variabler med manglende data kan vælges). Hvis der er statistisk signifikant forskel mellem nogle af de øvrige variabler i forhold til manglende data i den valgte variable kan det være et udtryk for at data ikke mangler tilfældigt."
|
||||
"Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything.","Vælg et navn til den nye variabel, skriv din formel og tryk så på knappen for at gemme variablen, eller annuler for at lukke uden at gemme."
|
||||
"Please fill in web address and API token, then press 'Connect'.","Udfyld serveradresse og API-nøgle, og tryk så 'Fobind'."
|
||||
"Other","Other"
|
||||
"Hour of the day","Time på dagen"
|
||||
"Breaks","Grupper"
|
||||
"By day of the week","Efter ugedag"
|
||||
"By weekday","Efter ugedag"
|
||||
"By week number and year","Efter ugenummer og årstal"
|
||||
"By month and year","Efter måned og årstal"
|
||||
"By month only","Efter måned alene"
|
||||
"By quarter of the year","Efter kvartal"
|
||||
"By year","Efter år"
|
||||
"Keep only most common","Behold kun de hyppigste"
|
||||
"Number","Antal"
|
||||
"Combine below percentage","Kombiner under procentsats"
|
||||
"Percentage","Procentsats"
|
||||
"By specified numbers","Efter specifikke værdier"
|
||||
"By quantiles (groups of equal size)","I grupper af samme størrelse"
|
||||
"By week number","Efter ugenummer alene"
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.","Der er mere avancerede muligheder for at ændre kategoriske variable, oprette nye kategoriske variabler fra eksisterende data eller nye variable baseret på R-kode. Nederst kan du gendanne originale data."
|
||||
"Split the variable","Split the variable"
|
||||
"Original data","Original data"
|
||||
"Preview of result","Preview of result"
|
||||
"No character variables with accepted delimiters detected.","No character variables with accepted delimiters detected."
|
||||
"Variable to split:","Variable to split:"
|
||||
"Text or character to split string by","Text or character to split string by"
|
||||
"Select delimiter","Select delimiter"
|
||||
"Direction:","Direction:"
|
||||
"Split string to multiple columns. Keep number of rows.","Split string to multiple columns. Keep number of rows."
|
||||
"Split string to multiple observations (rows) in the same column. Also ads id and instance columns","Split string to multiple observations (rows) in the same column. Also ads id and instance columns"
|
||||
"Browse data preview","Browse data preview"
|
||||
"Split character string","Split character string"
|
||||
"Split text","Split text"
|
||||
"Split a text column by a recognised delimiter.","Split a text column by a recognised delimiter."
|
||||
"Split a character string by a common delimiter","Split a character string by a common delimiter"
|
||||
"Apply split","Apply split"
|
||||
"Stacked relative barplot","Stacked relative barplot"
|
||||
"Create relative stacked barplots to show the distribution of categorical levels","Create relative stacked barplots to show the distribution of categorical levels"
|
||||
"Side-by-side barplot","Side-by-side barplot"
|
||||
"Create side-by-side barplot to show the distribution of categorical levels","Create side-by-side barplot to show the distribution of categorical levels"
|
||||
"Select table theme","Select table theme"
|
||||
"Level of detail","Level of detail"
|
||||
"Minimal","Minimal"
|
||||
"Extensive","Extensive"
|
||||
"Letters","Letters"
|
||||
"Words","Words"
|
||||
"Shorten to first letters","Shorten to first letters"
|
||||
"Shorten to first words","Shorten to first words"
|
||||
"Missings across variables by the variable **'{input$missings_var}'**","Missings across variables by the variable **'{input$missings_var}'**"
|
||||
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Missing vs non-missing observations in the variable **'{input$missings_var}'**"
|
||||
"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.","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."
|
||||
"Calculating. Hold tight for a moment..","Calculating. Hold tight for a moment.."
|
||||
"Overview of missing observations","Overview of missing observations"
|
||||
"Analysis method for missingness overview","Analysis method for missingness overview"
|
||||
"Overview of missings across variables","Overview of missings across variables"
|
||||
"Overview of difference in variables by missing status in outcome","Overview of difference in variables by missing status in outcome"
|
||||
"Select a variable for grouped overview","Select a variable for grouped overview"
|
||||
"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"
|
||||
|
|
|
|||
|
311
inst/translations/translation_de.csv
Normal file
311
inst/translations/translation_de.csv
Normal file
|
|
@ -0,0 +1,311 @@
|
|||
"en","de"
|
||||
"Hello","Hallo"
|
||||
"The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent.","The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent."
|
||||
"No variables have a correlation measure above the threshold.","No variables have a correlation measure above the threshold."
|
||||
"and","and"
|
||||
"The following error occured on determining correlations:","The following error occured on determining correlations:"
|
||||
"from each pair","from each pair"
|
||||
"New column name:","New column name:"
|
||||
"Group calculation by:","Group calculation by:"
|
||||
"Enter an expression to define new column:","Enter an expression to define new column:"
|
||||
"Click on a column name to add it to the expression:","Click on a column name to add it to the expression:"
|
||||
"Create column","Create column"
|
||||
"Cancel","Cancel"
|
||||
"Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything.","Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything."
|
||||
"New column name cannot be empty","New column name cannot be empty"
|
||||
"Create a new column","Create a new column"
|
||||
"Some operations are not allowed","Some operations are not allowed"
|
||||
"Column added!","Column added!"
|
||||
"Unique values:","Unique values:"
|
||||
"Variable to cut:","Variable to cut:"
|
||||
"Close intervals on the right","Close intervals on the right"
|
||||
"Include lowest value","Include lowest value"
|
||||
"Create factor variable","Create factor variable"
|
||||
"Fixed breaks:","Fixed breaks:"
|
||||
"Method:","Method:"
|
||||
"Other","Other"
|
||||
"Convert Numeric to Factor","Convert Numeric to Factor"
|
||||
"Hour of the day","Hour of the day"
|
||||
"Breaks","Breaks"
|
||||
"By day of the week","By day of the week"
|
||||
"By weekday","By weekday"
|
||||
"By week number and year","By week number and year"
|
||||
"By week number","By week number"
|
||||
"By month and year","By month and year"
|
||||
"By month only","By month only"
|
||||
"By quarter of the year","By quarter of the year"
|
||||
"By year","By year"
|
||||
"Keep only most common","Keep only most common"
|
||||
"Number","Number"
|
||||
"Combine below percentage","Combine below percentage"
|
||||
"Percentage","Percentage"
|
||||
"By specified numbers","By specified numbers"
|
||||
"By quantiles (groups of equal size)","By quantiles (groups of equal size)"
|
||||
"Only non-text variables are available for plotting. Go the ""Data"" to reclass data to plot.","Only non-text variables are available for plotting. Go the ""Data"" to reclass data to plot."
|
||||
"Plot","Plot"
|
||||
"Adjust settings, then press ""Plot"".","Adjust settings, then press ""Plot""."
|
||||
"Plot height (mm)","Plot height (mm)"
|
||||
"Plot width (mm)","Plot width (mm)"
|
||||
"File format","File format"
|
||||
"Download plot","Download plot"
|
||||
"Create plot","Create plot"
|
||||
"Download","Download"
|
||||
"Select variable","Select variable"
|
||||
"Response variable","Response variable"
|
||||
"Plot type","Plot type"
|
||||
"Please select","Please select"
|
||||
"Additional variables","Additional variables"
|
||||
"Secondary variable","Secondary variable"
|
||||
"No variable","No variable"
|
||||
"Grouping variable","Grouping variable"
|
||||
"No stratification","No stratification"
|
||||
"Drawing the plot. Hold tight for a moment..","Drawing the plot. Hold tight for a moment.."
|
||||
"#Plotting\n","#Plotting\n"
|
||||
"Stacked horizontal bars","Stacked horizontal bars"
|
||||
"A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars","A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars"
|
||||
"Violin plot","Violin plot"
|
||||
"A modern alternative to the classic boxplot to visualise data distribution","A modern alternative to the classic boxplot to visualise data distribution"
|
||||
"Sankey plot","Sankey plot"
|
||||
"A way of visualising change between groups","A way of visualising change between groups"
|
||||
"Scatter plot","Scatter plot"
|
||||
"A classic way of showing the association between to variables","A classic way of showing the association between to variables"
|
||||
"Box plot","Box plot"
|
||||
"A classic way to plot data distribution by groups","A classic way to plot data distribution by groups"
|
||||
"Euler diagram","Euler diagram"
|
||||
"Generate area-proportional Euler diagrams to display set relationships","Generate area-proportional Euler diagrams to display set relationships"
|
||||
"Unique:","Unique:"
|
||||
"Missing:","Missing:"
|
||||
"Most Common:","Most Common:"
|
||||
"Min:","Min:"
|
||||
"Mean:","Mean:"
|
||||
"Median:","Median:"
|
||||
"Max:","Max:"
|
||||
"{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases.","{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases."
|
||||
"Import a dataset from an environment","Import a dataset from an environment"
|
||||
"Select a data source:","Select a data source:"
|
||||
"Select source","Select source"
|
||||
"Select a dataset:","Select a dataset:"
|
||||
"List of datasets...","List of datasets..."
|
||||
"No data selected!","No data selected!"
|
||||
"Use a dataset from your environment or from the environment of a package.","Use a dataset from your environment or from the environment of a package."
|
||||
"No dataset here...","No dataset here..."
|
||||
"Imported data","Imported data"
|
||||
"Not a data.frame","Not a data.frame"
|
||||
"Rows to skip before reading data:","Rows to skip before reading data:"
|
||||
"Missing values character(s):","Missing values character(s):"
|
||||
"if several use a comma (',') to separate them","if several use a comma (',') to separate them"
|
||||
"Decimal separator:","Decimal separator:"
|
||||
"Encoding:","Encoding:"
|
||||
"Upload a file:","Upload a file:"
|
||||
"Browse...","Browse..."
|
||||
"Select sheet to import:","Select sheet to import:"
|
||||
"No file selected.","No file selected."
|
||||
"You can choose between these file types:","You can choose between these file types:"
|
||||
"You can import {file_extensions_text} files","You can import {file_extensions_text} files"
|
||||
"First five rows are shown below:","First five rows are shown below:"
|
||||
"No missing observations","No missing observations"
|
||||
"Grouped by {get_label(data,ter)}","Grouped by {get_label(data,ter)}"
|
||||
"Import data from REDCap","Import data from REDCap"
|
||||
"REDCap server","REDCap server"
|
||||
"Web address","Web address"
|
||||
"Format should be either 'https://redcap.your.institution/' or 'https://your.institution/redcap/'","Format should be either 'https://redcap.your.institution/' or 'https://your.institution/redcap/'"
|
||||
"API token","API token"
|
||||
"The token is a string of 32 numbers and letters.","The token is a string of 32 numbers and letters."
|
||||
"Connect","Connect"
|
||||
"Please fill in web address and API token, then press 'Connect'.","Please fill in web address and API token, then press 'Connect'."
|
||||
"Data import parameters","Data import parameters"
|
||||
"Select fields/variables to import and click the funnel to apply optional filters","Select fields/variables to import and click the funnel to apply optional filters"
|
||||
"Import","Import"
|
||||
"Click to see data dictionary","Click to see data dictionary"
|
||||
"Connected to server!","Connected to server!"
|
||||
"The {data_rv$info$project_title} project is loaded.","The {data_rv$info$project_title} project is loaded."
|
||||
"Data dictionary","Data dictionary"
|
||||
"Preview:","Preview:"
|
||||
"Imported data set","Imported data set"
|
||||
"Select fields/variables to import:","Select fields/variables to import:"
|
||||
"Specify the data format","Specify the data format"
|
||||
"Fill missing values?","Fill missing values?"
|
||||
"Requested data was retrieved!","Requested data was retrieved!"
|
||||
"Data retrieved, but it looks like only the ID was retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access.","Data retrieved, but it looks like only the ID was retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access."
|
||||
"Data retrieved, but it looks like not all requested fields were retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access.","Data retrieved, but it looks like not all requested fields were retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access."
|
||||
"Click to see the imported data","Click to see the imported data"
|
||||
"Regression table","Regression table"
|
||||
"Regression","Regression"
|
||||
"Specify covariables","Specify covariables"
|
||||
"If none are selected, all are included.","If none are selected, all are included."
|
||||
"Analyse","Analyse"
|
||||
"Working...","Working..."
|
||||
"Press 'Analyse' to create the regression model and after changing parameters.","Press 'Analyse' to create the regression model and after changing parameters."
|
||||
"Coefficient plot","Coefficient plot"
|
||||
"Model checks","Model checks"
|
||||
"Coefficients plot","Coefficients plot"
|
||||
"Checks","Checks"
|
||||
"Yes","Yes"
|
||||
"No","No"
|
||||
"Show p-value","Show p-value"
|
||||
"Select outcome variable","Select outcome variable"
|
||||
"Choose regression analysis","Choose regression analysis"
|
||||
"Covariables to format as categorical","Covariables to format as categorical"
|
||||
"Select variable to stratify baseline","Select variable to stratify baseline"
|
||||
"Select models to plot","Select models to plot"
|
||||
"Creating regression models failed with the following error:","Creating regression models failed with the following error:"
|
||||
"Creating a regression table failed with the following error:","Creating a regression table failed with the following error:"
|
||||
"Saving the plot. Hold on for a moment..","Saving the plot. Hold on for a moment.."
|
||||
"Running model assumptions checks failed with the following error:","Running model assumptions checks failed with the following error:"
|
||||
"Select checks to plot","Select checks to plot"
|
||||
"Multivariable regression model checks","Multivariable regression model checks"
|
||||
"www/intro.html","www/intro.html"
|
||||
"www/intro.md","www/intro.md"
|
||||
"Get started","Get started"
|
||||
"Choose your data","Choose your data"
|
||||
"Upload a file, get data directly from REDCap or use local or sample data.","Upload a file, get data directly from REDCap or use local or sample data."
|
||||
"Please be mindfull handling sensitive data","Please be mindfull handling sensitive data"
|
||||
"<p>The <em><strong>FreesearchR</strong></em> app only stores data for analyses, but please only use with sensitive data when running locally. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Read more here</a></p>","<p>The <em><strong>FreesearchR</strong></em> app only stores data for analyses, but please only use with sensitive data when running locally. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Read more here</a></p>"
|
||||
"Quick overview","Quick overview"
|
||||
"Select variables for final import","Select variables for final import"
|
||||
"Exclude incomplete variables:","Exclude incomplete variables:"
|
||||
"At 0, only complete variables are included; at 100, all variables are included.","At 0, only complete variables are included; at 100, all variables are included."
|
||||
"Manual selection:","Manual selection:"
|
||||
"Let's begin!","Let's begin!"
|
||||
"Prepare","Prepare"
|
||||
"Overview and filter","Overview and filter"
|
||||
"Overview and filtering","Overview and filtering"
|
||||
"Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse observations and apply different data filters.","Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse observations and apply different data filters."
|
||||
"Visual overview","Visual overview"
|
||||
"Browse observations","Browse observations"
|
||||
"Filter data types","Filter data types"
|
||||
"Filter observations","Filter observations"
|
||||
"Apply filter on observation","Apply filter on observation"
|
||||
"Edit and create data","Edit and create data"
|
||||
"Subset, rename and convert variables","Subset, rename and convert variables"
|
||||
"Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.).","Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.)."
|
||||
"Please note that data modifications are applied before any filtering.","Please note that data modifications are applied before any filtering."
|
||||
"Advanced data manipulation","Advanced data manipulation"
|
||||
"Below options allow more advanced varaible manipulations.","Below options allow more advanced varaible manipulations."
|
||||
"Reorder factor levels","Reorder factor levels"
|
||||
"Reorder the levels of factor/categorical variables.","Reorder the levels of factor/categorical variables."
|
||||
"New factor","New factor"
|
||||
"Create factor/categorical variable from a continous variable (number/date/time).","Create factor/categorical variable from a continous variable (number/date/time)."
|
||||
"New variable","New variable"
|
||||
"Create a new variable based on an R-expression.","Create a new variable based on an R-expression."
|
||||
"Compare modified data to original","Compare modified data to original"
|
||||
"Raw print of the original vs the modified data.","Raw print of the original vs the modified data."
|
||||
"Original data:","Original data:"
|
||||
"Modified data:","Modified data:"
|
||||
"Restore original data","Restore original data"
|
||||
"Reset to original imported dataset. Careful! There is no un-doing.","Reset to original imported dataset. Careful! There is no un-doing."
|
||||
"Evaluate","Evaluate"
|
||||
"Characteristics","Characteristics"
|
||||
"Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list.","Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list."
|
||||
"Compare strata?","Compare strata?"
|
||||
"Option to perform statistical comparisons between strata in baseline table.","Option to perform statistical comparisons between strata in baseline table."
|
||||
"Press 'Evaluate' to create the comparison table.","Press 'Evaluate' to create the comparison table."
|
||||
"Correlations","Correlations"
|
||||
"To avoid evaluating the correlation of the outcome variable, this can be excluded from the plot or select 'none'.","To avoid evaluating the correlation of the outcome variable, this can be excluded from the plot or select 'none'."
|
||||
"Correlation cut-off","Correlation cut-off"
|
||||
"Set the cut-off for considered 'highly correlated'.","Set the cut-off for considered 'highly correlated'."
|
||||
"Missings","Missings"
|
||||
"Visuals","Visuals"
|
||||
"Analysis validation","Analysis validation"
|
||||
"Report","Report"
|
||||
"Choose your favourite output file format for further work, and download, when the analyses are done.","Choose your favourite output file format for further work, and download, when the analyses are done."
|
||||
"Factor variable to reorder:","Factor variable to reorder:"
|
||||
"Sort by levels","Sort by levels"
|
||||
"Sort by count","Sort by count"
|
||||
"Create a new variable (otherwise replaces the one selected)","Create a new variable (otherwise replaces the one selected)"
|
||||
"Update factor variable","Update factor variable"
|
||||
"Sort count","Sort count"
|
||||
"Levels","Levels"
|
||||
"Count","Count"
|
||||
"Update levels of a factor","Update levels of a factor"
|
||||
"Update & select variables","Update & select variables"
|
||||
"Date format:","Date format:"
|
||||
"Date to use as origin to convert date/datetime:","Date to use as origin to convert date/datetime:"
|
||||
"Apply changes","Apply changes"
|
||||
"No data to display.","No data to display."
|
||||
"Data successfully updated!","Data successfully updated!"
|
||||
"You removed {p_out} % of observations.","You removed {p_out} % of observations."
|
||||
"You removed {p_out} % of variables.","You removed {p_out} % of variables."
|
||||
"There is a total of {p_miss} % missing observations.","There is a total of {p_miss} % missing observations."
|
||||
"Data includes {n_pairs} pairs of highly correlated variables.","Data includes {n_pairs} pairs of highly correlated variables."
|
||||
"Class","Class"
|
||||
"Observations","Observations"
|
||||
"File upload","File upload"
|
||||
"REDCap server export","REDCap server export"
|
||||
"Local or sample data","Local or sample data"
|
||||
"Data is only stored for analyses and deleted when the app is closed.","Data is only stored for analyses and deleted when the app is closed."
|
||||
"Consider [running ***FreesearchR*** locally](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine) if working with sensitive data.","Consider [running ***FreesearchR*** locally](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine) if working with sensitive data."
|
||||
"Documentation","Documentation"
|
||||
"Feedback","Feedback"
|
||||
"License: AGPLv3","License: AGPLv3"
|
||||
"Source","Source"
|
||||
"Settings","Settings"
|
||||
"The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine).","The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine)."
|
||||
"Data classes and missing observations","Data classes and missing observations"
|
||||
"We encountered the following error showing missingness:","We encountered the following error showing missingness:"
|
||||
"Please confirm data reset!","Please confirm data reset!"
|
||||
"Sure you want to reset data? This cannot be undone.","Sure you want to reset data? This cannot be undone."
|
||||
"Confirm","Confirm"
|
||||
"The filtered data","The filtered data"
|
||||
"Create new factor","Create new factor"
|
||||
"This window is aimed at advanced users and require some *R*-experience!","This window is aimed at advanced users and require some *R*-experience!"
|
||||
"Create new variables","Create new variables"
|
||||
"Select data types to include","Select data types to include"
|
||||
"Uploaded data overview","Uploaded data overview"
|
||||
"We encountered the following error browsing your data:","We encountered the following error browsing your data:"
|
||||
"Here is an overview of how your data is interpreted, and where data is missing. Use this information to consider if data is missing at random or if some observations are missing systematically wich may be caused by an observation bias.","Here is an overview of how your data is interpreted, and where data is missing. Use this information to consider if data is missing at random or if some observations are missing systematically wich may be caused by an observation bias."
|
||||
"Data import","Data import"
|
||||
"Data import formatting","Data import formatting"
|
||||
"Data modifications","Data modifications"
|
||||
"Variables filter","Variables filter"
|
||||
"Data filter","Data filter"
|
||||
"Data characteristics table","Data characteristics table"
|
||||
"The dataset without text variables","The dataset without text variables"
|
||||
"The data includes {n_col} variables. Please limit to 100.","The data includes {n_col} variables. Please limit to 100."
|
||||
"Creating the table. Hold on for a moment..","Creating the table. Hold on for a moment.."
|
||||
"Generating the report. Hold on for a moment..","Generating the report. Hold on for a moment.."
|
||||
"We encountered the following error creating your report:","We encountered the following error creating your report:"
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.","There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data."
|
||||
"Text or character to split string by","Text or character to split string by"
|
||||
"Split the variable","Split the variable"
|
||||
"Variable to split:","Variable to split:"
|
||||
"Direction:","Direction:"
|
||||
"Split string to multiple columns. Keep number of rows.","Split string to multiple columns. Keep number of rows."
|
||||
"Split string to multiple observations (rows) in the same column. Also ads id and instance columns","Split string to multiple observations (rows) in the same column. Also ads id and instance columns"
|
||||
"Split character string","Split character string"
|
||||
"Split text","Split text"
|
||||
"Split a character string by a common delimiter","Split a character string by a common delimiter"
|
||||
"Select delimiter","Select delimiter"
|
||||
"Browse data preview","Browse data preview"
|
||||
"Original data","Original data"
|
||||
"Preview of result","Preview of result"
|
||||
"No character variables with accepted delimiters detected.","No character variables with accepted delimiters detected."
|
||||
"Split a text column by a recognised delimiter.","Split a text column by a recognised delimiter."
|
||||
"Apply split","Apply split"
|
||||
"Stacked relative barplot","Stacked relative barplot"
|
||||
"Create relative stacked barplots to show the distribution of categorical levels","Create relative stacked barplots to show the distribution of categorical levels"
|
||||
"Side-by-side barplot","Side-by-side barplot"
|
||||
"Create side-by-side barplot to show the distribution of categorical levels","Create side-by-side barplot to show the distribution of categorical levels"
|
||||
"Select table theme","Select table theme"
|
||||
"Level of detail","Level of detail"
|
||||
"Minimal","Minimal"
|
||||
"Extensive","Extensive"
|
||||
"Letters","Letters"
|
||||
"Words","Words"
|
||||
"Shorten to first letters","Shorten to first letters"
|
||||
"Shorten to first words","Shorten to first words"
|
||||
"Missings across variables by the variable **'{input$missings_var}'**","Missings across variables by the variable **'{input$missings_var}'**"
|
||||
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Missing vs non-missing observations in the variable **'{input$missings_var}'**"
|
||||
"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.","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."
|
||||
"Calculating. Hold tight for a moment..","Calculating. Hold tight for a moment.."
|
||||
"Overview of missing observations","Overview of missing observations"
|
||||
"Analysis method for missingness overview","Analysis method for missingness overview"
|
||||
"Overview of missings across variables","Overview of missings across variables"
|
||||
"Overview of difference in variables by missing status in outcome","Overview of difference in variables by missing status in outcome"
|
||||
"Select a variable for grouped overview","Select a variable for grouped overview"
|
||||
"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"
|
||||
|
311
inst/translations/translation_sv.csv
Normal file
311
inst/translations/translation_sv.csv
Normal file
|
|
@ -0,0 +1,311 @@
|
|||
"en","sv"
|
||||
"Hello","Hei"
|
||||
"The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent.","The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent."
|
||||
"No variables have a correlation measure above the threshold.","No variables have a correlation measure above the threshold."
|
||||
"and","and"
|
||||
"The following error occured on determining correlations:","The following error occured on determining correlations:"
|
||||
"from each pair","from each pair"
|
||||
"New column name:","New column name:"
|
||||
"Group calculation by:","Group calculation by:"
|
||||
"Enter an expression to define new column:","Enter an expression to define new column:"
|
||||
"Click on a column name to add it to the expression:","Click on a column name to add it to the expression:"
|
||||
"Create column","Create column"
|
||||
"Cancel","Cancel"
|
||||
"Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything.","Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything."
|
||||
"New column name cannot be empty","New column name cannot be empty"
|
||||
"Create a new column","Create a new column"
|
||||
"Some operations are not allowed","Some operations are not allowed"
|
||||
"Column added!","Column added!"
|
||||
"Unique values:","Unique values:"
|
||||
"Variable to cut:","Variable to cut:"
|
||||
"Close intervals on the right","Close intervals on the right"
|
||||
"Include lowest value","Include lowest value"
|
||||
"Create factor variable","Create factor variable"
|
||||
"Fixed breaks:","Fixed breaks:"
|
||||
"Method:","Method:"
|
||||
"Other","Other"
|
||||
"Convert Numeric to Factor","Convert Numeric to Factor"
|
||||
"Hour of the day","Hour of the day"
|
||||
"Breaks","Breaks"
|
||||
"By day of the week","By day of the week"
|
||||
"By weekday","By weekday"
|
||||
"By week number and year","By week number and year"
|
||||
"By week number","By week number"
|
||||
"By month and year","By month and year"
|
||||
"By month only","By month only"
|
||||
"By quarter of the year","By quarter of the year"
|
||||
"By year","By year"
|
||||
"Keep only most common","Keep only most common"
|
||||
"Number","Number"
|
||||
"Combine below percentage","Combine below percentage"
|
||||
"Percentage","Percentage"
|
||||
"By specified numbers","By specified numbers"
|
||||
"By quantiles (groups of equal size)","By quantiles (groups of equal size)"
|
||||
"Only non-text variables are available for plotting. Go the ""Data"" to reclass data to plot.","Only non-text variables are available for plotting. Go the ""Data"" to reclass data to plot."
|
||||
"Plot","Plot"
|
||||
"Adjust settings, then press ""Plot"".","Adjust settings, then press ""Plot""."
|
||||
"Plot height (mm)","Plot height (mm)"
|
||||
"Plot width (mm)","Plot width (mm)"
|
||||
"File format","File format"
|
||||
"Download plot","Download plot"
|
||||
"Create plot","Create plot"
|
||||
"Download","Download"
|
||||
"Select variable","Select variable"
|
||||
"Response variable","Response variable"
|
||||
"Plot type","Plot type"
|
||||
"Please select","Please select"
|
||||
"Additional variables","Additional variables"
|
||||
"Secondary variable","Secondary variable"
|
||||
"No variable","No variable"
|
||||
"Grouping variable","Grouping variable"
|
||||
"No stratification","No stratification"
|
||||
"Drawing the plot. Hold tight for a moment..","Drawing the plot. Hold tight for a moment.."
|
||||
"#Plotting\n","#Plotting\n"
|
||||
"Stacked horizontal bars","Stacked horizontal bars"
|
||||
"A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars","A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars"
|
||||
"Violin plot","Violin plot"
|
||||
"A modern alternative to the classic boxplot to visualise data distribution","A modern alternative to the classic boxplot to visualise data distribution"
|
||||
"Sankey plot","Sankey plot"
|
||||
"A way of visualising change between groups","A way of visualising change between groups"
|
||||
"Scatter plot","Scatter plot"
|
||||
"A classic way of showing the association between to variables","A classic way of showing the association between to variables"
|
||||
"Box plot","Box plot"
|
||||
"A classic way to plot data distribution by groups","A classic way to plot data distribution by groups"
|
||||
"Euler diagram","Euler diagram"
|
||||
"Generate area-proportional Euler diagrams to display set relationships","Generate area-proportional Euler diagrams to display set relationships"
|
||||
"Unique:","Unique:"
|
||||
"Missing:","Missing:"
|
||||
"Most Common:","Most Common:"
|
||||
"Min:","Min:"
|
||||
"Mean:","Mean:"
|
||||
"Median:","Median:"
|
||||
"Max:","Max:"
|
||||
"{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases.","{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases."
|
||||
"Import a dataset from an environment","Import a dataset from an environment"
|
||||
"Select a data source:","Select a data source:"
|
||||
"Select source","Select source"
|
||||
"Select a dataset:","Select a dataset:"
|
||||
"List of datasets...","List of datasets..."
|
||||
"No data selected!","No data selected!"
|
||||
"Use a dataset from your environment or from the environment of a package.","Use a dataset from your environment or from the environment of a package."
|
||||
"No dataset here...","No dataset here..."
|
||||
"Imported data","Imported data"
|
||||
"Not a data.frame","Not a data.frame"
|
||||
"Rows to skip before reading data:","Rows to skip before reading data:"
|
||||
"Missing values character(s):","Missing values character(s):"
|
||||
"if several use a comma (',') to separate them","if several use a comma (',') to separate them"
|
||||
"Decimal separator:","Decimal separator:"
|
||||
"Encoding:","Encoding:"
|
||||
"Upload a file:","Upload a file:"
|
||||
"Browse...","Browse..."
|
||||
"Select sheet to import:","Select sheet to import:"
|
||||
"No file selected.","No file selected."
|
||||
"You can choose between these file types:","You can choose between these file types:"
|
||||
"You can import {file_extensions_text} files","You can import {file_extensions_text} files"
|
||||
"First five rows are shown below:","First five rows are shown below:"
|
||||
"No missing observations","No missing observations"
|
||||
"Grouped by {get_label(data,ter)}","Grouped by {get_label(data,ter)}"
|
||||
"Import data from REDCap","Import data from REDCap"
|
||||
"REDCap server","REDCap server"
|
||||
"Web address","Web address"
|
||||
"Format should be either 'https://redcap.your.institution/' or 'https://your.institution/redcap/'","Format should be either 'https://redcap.your.institution/' or 'https://your.institution/redcap/'"
|
||||
"API token","API token"
|
||||
"The token is a string of 32 numbers and letters.","The token is a string of 32 numbers and letters."
|
||||
"Connect","Connect"
|
||||
"Please fill in web address and API token, then press 'Connect'.","Please fill in web address and API token, then press 'Connect'."
|
||||
"Data import parameters","Data import parameters"
|
||||
"Select fields/variables to import and click the funnel to apply optional filters","Select fields/variables to import and click the funnel to apply optional filters"
|
||||
"Import","Import"
|
||||
"Click to see data dictionary","Click to see data dictionary"
|
||||
"Connected to server!","Connected to server!"
|
||||
"The {data_rv$info$project_title} project is loaded.","The {data_rv$info$project_title} project is loaded."
|
||||
"Data dictionary","Data dictionary"
|
||||
"Preview:","Preview:"
|
||||
"Imported data set","Imported data set"
|
||||
"Select fields/variables to import:","Select fields/variables to import:"
|
||||
"Specify the data format","Specify the data format"
|
||||
"Fill missing values?","Fill missing values?"
|
||||
"Requested data was retrieved!","Requested data was retrieved!"
|
||||
"Data retrieved, but it looks like only the ID was retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access.","Data retrieved, but it looks like only the ID was retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access."
|
||||
"Data retrieved, but it looks like not all requested fields were retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access.","Data retrieved, but it looks like not all requested fields were retrieved from the server. Please check with your REDCap administrator that you have required permissions for data access."
|
||||
"Click to see the imported data","Click to see the imported data"
|
||||
"Regression table","Regression table"
|
||||
"Regression","Regression"
|
||||
"Specify covariables","Specify covariables"
|
||||
"If none are selected, all are included.","If none are selected, all are included."
|
||||
"Analyse","Analyse"
|
||||
"Working...","Working..."
|
||||
"Press 'Analyse' to create the regression model and after changing parameters.","Press 'Analyse' to create the regression model and after changing parameters."
|
||||
"Coefficient plot","Coefficient plot"
|
||||
"Model checks","Model checks"
|
||||
"Coefficients plot","Coefficients plot"
|
||||
"Checks","Checks"
|
||||
"Yes","Yes"
|
||||
"No","No"
|
||||
"Show p-value","Show p-value"
|
||||
"Select outcome variable","Select outcome variable"
|
||||
"Choose regression analysis","Choose regression analysis"
|
||||
"Covariables to format as categorical","Covariables to format as categorical"
|
||||
"Select variable to stratify baseline","Select variable to stratify baseline"
|
||||
"Select models to plot","Select models to plot"
|
||||
"Creating regression models failed with the following error:","Creating regression models failed with the following error:"
|
||||
"Creating a regression table failed with the following error:","Creating a regression table failed with the following error:"
|
||||
"Saving the plot. Hold on for a moment..","Saving the plot. Hold on for a moment.."
|
||||
"Running model assumptions checks failed with the following error:","Running model assumptions checks failed with the following error:"
|
||||
"Select checks to plot","Select checks to plot"
|
||||
"Multivariable regression model checks","Multivariable regression model checks"
|
||||
"www/intro.html","www/intro.html"
|
||||
"www/intro.md","www/intro.md"
|
||||
"Get started","Get started"
|
||||
"Choose your data","Choose your data"
|
||||
"Upload a file, get data directly from REDCap or use local or sample data.","Upload a file, get data directly from REDCap or use local or sample data."
|
||||
"Please be mindfull handling sensitive data","Please be mindfull handling sensitive data"
|
||||
"<p>The <em><strong>FreesearchR</strong></em> app only stores data for analyses, but please only use with sensitive data when running locally. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Read more here</a></p>","<p>The <em><strong>FreesearchR</strong></em> app only stores data for analyses, but please only use with sensitive data when running locally. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Read more here</a></p>"
|
||||
"Quick overview","Quick overview"
|
||||
"Select variables for final import","Select variables for final import"
|
||||
"Exclude incomplete variables:","Exclude incomplete variables:"
|
||||
"At 0, only complete variables are included; at 100, all variables are included.","At 0, only complete variables are included; at 100, all variables are included."
|
||||
"Manual selection:","Manual selection:"
|
||||
"Let's begin!","Let's begin!"
|
||||
"Prepare","Prepare"
|
||||
"Overview and filter","Overview and filter"
|
||||
"Overview and filtering","Overview and filtering"
|
||||
"Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse observations and apply different data filters.","Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse observations and apply different data filters."
|
||||
"Visual overview","Visual overview"
|
||||
"Browse observations","Browse observations"
|
||||
"Filter data types","Filter data types"
|
||||
"Filter observations","Filter observations"
|
||||
"Apply filter on observation","Apply filter on observation"
|
||||
"Edit and create data","Edit and create data"
|
||||
"Subset, rename and convert variables","Subset, rename and convert variables"
|
||||
"Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.).","Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.)."
|
||||
"Please note that data modifications are applied before any filtering.","Please note that data modifications are applied before any filtering."
|
||||
"Advanced data manipulation","Advanced data manipulation"
|
||||
"Below options allow more advanced varaible manipulations.","Below options allow more advanced varaible manipulations."
|
||||
"Reorder factor levels","Reorder factor levels"
|
||||
"Reorder the levels of factor/categorical variables.","Reorder the levels of factor/categorical variables."
|
||||
"New factor","New factor"
|
||||
"Create factor/categorical variable from a continous variable (number/date/time).","Create factor/categorical variable from a continous variable (number/date/time)."
|
||||
"New variable","New variable"
|
||||
"Create a new variable based on an R-expression.","Create a new variable based on an R-expression."
|
||||
"Compare modified data to original","Compare modified data to original"
|
||||
"Raw print of the original vs the modified data.","Raw print of the original vs the modified data."
|
||||
"Original data:","Original data:"
|
||||
"Modified data:","Modified data:"
|
||||
"Restore original data","Restore original data"
|
||||
"Reset to original imported dataset. Careful! There is no un-doing.","Reset to original imported dataset. Careful! There is no un-doing."
|
||||
"Evaluate","Evaluate"
|
||||
"Characteristics","Characteristics"
|
||||
"Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list.","Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list."
|
||||
"Compare strata?","Compare strata?"
|
||||
"Option to perform statistical comparisons between strata in baseline table.","Option to perform statistical comparisons between strata in baseline table."
|
||||
"Press 'Evaluate' to create the comparison table.","Press 'Evaluate' to create the comparison table."
|
||||
"Correlations","Correlations"
|
||||
"To avoid evaluating the correlation of the outcome variable, this can be excluded from the plot or select 'none'.","To avoid evaluating the correlation of the outcome variable, this can be excluded from the plot or select 'none'."
|
||||
"Correlation cut-off","Correlation cut-off"
|
||||
"Set the cut-off for considered 'highly correlated'.","Set the cut-off for considered 'highly correlated'."
|
||||
"Missings","Missings"
|
||||
"Visuals","Visuals"
|
||||
"Analysis validation","Analysis validation"
|
||||
"Report","Report"
|
||||
"Choose your favourite output file format for further work, and download, when the analyses are done.","Choose your favourite output file format for further work, and download, when the analyses are done."
|
||||
"Factor variable to reorder:","Factor variable to reorder:"
|
||||
"Sort by levels","Sort by levels"
|
||||
"Sort by count","Sort by count"
|
||||
"Create a new variable (otherwise replaces the one selected)","Create a new variable (otherwise replaces the one selected)"
|
||||
"Update factor variable","Update factor variable"
|
||||
"Sort count","Sort count"
|
||||
"Levels","Levels"
|
||||
"Count","Count"
|
||||
"Update levels of a factor","Update levels of a factor"
|
||||
"Update & select variables","Update & select variables"
|
||||
"Date format:","Date format:"
|
||||
"Date to use as origin to convert date/datetime:","Date to use as origin to convert date/datetime:"
|
||||
"Apply changes","Apply changes"
|
||||
"No data to display.","No data to display."
|
||||
"Data successfully updated!","Data successfully updated!"
|
||||
"You removed {p_out} % of observations.","You removed {p_out} % of observations."
|
||||
"You removed {p_out} % of variables.","You removed {p_out} % of variables."
|
||||
"There is a total of {p_miss} % missing observations.","There is a total of {p_miss} % missing observations."
|
||||
"Data includes {n_pairs} pairs of highly correlated variables.","Data includes {n_pairs} pairs of highly correlated variables."
|
||||
"Class","Class"
|
||||
"Observations","Observations"
|
||||
"File upload","File upload"
|
||||
"REDCap server export","REDCap server export"
|
||||
"Local or sample data","Local or sample data"
|
||||
"Data is only stored for analyses and deleted when the app is closed.","Data is only stored for analyses and deleted when the app is closed."
|
||||
"Consider [running ***FreesearchR*** locally](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine) if working with sensitive data.","Consider [running ***FreesearchR*** locally](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine) if working with sensitive data."
|
||||
"Documentation","Documentation"
|
||||
"Feedback","Feedback"
|
||||
"License: AGPLv3","License: AGPLv3"
|
||||
"Source","Source"
|
||||
"Settings","Settings"
|
||||
"The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine).","The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine)."
|
||||
"Data classes and missing observations","Data classes and missing observations"
|
||||
"We encountered the following error showing missingness:","We encountered the following error showing missingness:"
|
||||
"Please confirm data reset!","Please confirm data reset!"
|
||||
"Sure you want to reset data? This cannot be undone.","Sure you want to reset data? This cannot be undone."
|
||||
"Confirm","Confirm"
|
||||
"The filtered data","The filtered data"
|
||||
"Create new factor","Create new factor"
|
||||
"This window is aimed at advanced users and require some *R*-experience!","This window is aimed at advanced users and require some *R*-experience!"
|
||||
"Create new variables","Create new variables"
|
||||
"Select data types to include","Select data types to include"
|
||||
"Uploaded data overview","Uploaded data overview"
|
||||
"We encountered the following error browsing your data:","We encountered the following error browsing your data:"
|
||||
"Here is an overview of how your data is interpreted, and where data is missing. Use this information to consider if data is missing at random or if some observations are missing systematically wich may be caused by an observation bias.","Here is an overview of how your data is interpreted, and where data is missing. Use this information to consider if data is missing at random or if some observations are missing systematically wich may be caused by an observation bias."
|
||||
"Data import","Data import"
|
||||
"Data import formatting","Data import formatting"
|
||||
"Data modifications","Data modifications"
|
||||
"Variables filter","Variables filter"
|
||||
"Data filter","Data filter"
|
||||
"Data characteristics table","Data characteristics table"
|
||||
"The dataset without text variables","The dataset without text variables"
|
||||
"The data includes {n_col} variables. Please limit to 100.","The data includes {n_col} variables. Please limit to 100."
|
||||
"Creating the table. Hold on for a moment..","Creating the table. Hold on for a moment.."
|
||||
"Generating the report. Hold on for a moment..","Generating the report. Hold on for a moment.."
|
||||
"We encountered the following error creating your report:","We encountered the following error creating your report:"
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.","There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data."
|
||||
"Text or character to split string by","Text or character to split string by"
|
||||
"Split the variable","Split the variable"
|
||||
"Variable to split:","Variable to split:"
|
||||
"Direction:","Direction:"
|
||||
"Split string to multiple columns. Keep number of rows.","Split string to multiple columns. Keep number of rows."
|
||||
"Split string to multiple observations (rows) in the same column. Also ads id and instance columns","Split string to multiple observations (rows) in the same column. Also ads id and instance columns"
|
||||
"Split character string","Split character string"
|
||||
"Split text","Split text"
|
||||
"Split a character string by a common delimiter","Split a character string by a common delimiter"
|
||||
"Select delimiter","Select delimiter"
|
||||
"Browse data preview","Browse data preview"
|
||||
"Original data","Original data"
|
||||
"Preview of result","Preview of result"
|
||||
"No character variables with accepted delimiters detected.","No character variables with accepted delimiters detected."
|
||||
"Split a text column by a recognised delimiter.","Split a text column by a recognised delimiter."
|
||||
"Apply split","Apply split"
|
||||
"Stacked relative barplot","Stacked relative barplot"
|
||||
"Create relative stacked barplots to show the distribution of categorical levels","Create relative stacked barplots to show the distribution of categorical levels"
|
||||
"Side-by-side barplot","Side-by-side barplot"
|
||||
"Create side-by-side barplot to show the distribution of categorical levels","Create side-by-side barplot to show the distribution of categorical levels"
|
||||
"Select table theme","Select table theme"
|
||||
"Level of detail","Level of detail"
|
||||
"Minimal","Minimal"
|
||||
"Extensive","Extensive"
|
||||
"Letters","Letters"
|
||||
"Words","Words"
|
||||
"Shorten to first letters","Shorten to first letters"
|
||||
"Shorten to first words","Shorten to first words"
|
||||
"Missings across variables by the variable **'{input$missings_var}'**","Missings across variables by the variable **'{input$missings_var}'**"
|
||||
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Missing vs non-missing observations in the variable **'{input$missings_var}'**"
|
||||
"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.","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."
|
||||
"Calculating. Hold tight for a moment..","Calculating. Hold tight for a moment.."
|
||||
"Overview of missing observations","Overview of missing observations"
|
||||
"Analysis method for missingness overview","Analysis method for missingness overview"
|
||||
"Overview of missings across variables","Overview of missings across variables"
|
||||
"Overview of difference in variables by missing status in outcome","Overview of difference in variables by missing status in outcome"
|
||||
"Select a variable for grouped overview","Select a variable for grouped overview"
|
||||
"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,31 +1,30 @@
|
|||
"en","sw"
|
||||
"Hello","Habari"
|
||||
"Get started","Get started"
|
||||
"File upload","File upload"
|
||||
"REDCap server export","REDCap server export"
|
||||
"Local or sample data","Local or sample data"
|
||||
"Please be mindfull handling sensitive data","Please be mindfull handling sensitive data"
|
||||
"The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine).","The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine)."
|
||||
"Quick overview","Quick overview"
|
||||
"Select variables for final import","Select variables for final import"
|
||||
"Exclude incomplete variables:","Exclude incomplete variables:"
|
||||
"Manual selection:","Manual selection:"
|
||||
"Let's begin!","Let's begin!"
|
||||
"Analysis validation","Analysis validation"
|
||||
"Report","Report"
|
||||
"Choose your favourite output file format for further work, and download, when the analyses are done.","Choose your favourite output file format for further work, and download, when the analyses are done."
|
||||
"Get started","Tuanze"
|
||||
"File upload","Upakiaji wa faili"
|
||||
"REDCap server export","Uhamishaji wa seva ya REDCap"
|
||||
"Local or sample data","Taarifa za ndani au za mfano"
|
||||
"Please be mindfull handling sensitive data","Tafadhali kumbuka kushughulikia data nyeti"
|
||||
"The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine).","Programu ya ***FreesearchR*** huhifadhi data kwa uchanganuzi pekee, lakini tafadhali tumia tu na data nyeti unapoendesha ndani ya nchi. [Soma zaidi hapa](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine)."
|
||||
"Quick overview","Muhtasari wa haraka"
|
||||
"Select variables for final import","Chagua vigeu kwa ajili ya uingizaji wa mwisho"
|
||||
"Exclude incomplete variables:","Usijumuishe vigeu visivyokamilika:"
|
||||
"Manual selection:","Uchaguzi wa mikono:"
|
||||
"Let's begin!","Tuanze!"
|
||||
"Analysis validation","Uthibitishaji wa uchambuzi"
|
||||
"Report","Ripoti"
|
||||
"Choose your favourite output file format for further work, and download, when the analyses are done.","Chagua umbizo la faili la towe lako kwa kazi zaidi, na upakue, uchanganuzi utakapofanywa."
|
||||
"www/intro.html","www/intro_sw.html"
|
||||
"<p>The <em><strong>FreesearchR</strong></em> app only stores data for analyses, but please only use with sensitive data when running locally. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Read more here</a></p>","<p>The <em><strong>FreesearchR</strong></em> app only stores data for analyses, but please only use with sensitive data when running locally. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Read more here</a></p>"
|
||||
"Overview and filter","Overview and filter"
|
||||
"Overview and filtering","Overview and filtering"
|
||||
"Visual overview","Visual overview"
|
||||
"Filter data types","Filter data types"
|
||||
"Filter observations","Filter observations"
|
||||
"Apply filter on observation","Apply filter on observation"
|
||||
"<p>The <em><strong>FreesearchR</strong></em> app only stores data for analyses, but please only use with sensitive data when running locally. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Read more here</a></p>","<p>Programu ya <em><strong>FreesearchR</strong></em> huhifadhi data kwa ajili ya uchanganuzi pekee, lakini tafadhali tumia tu na data nyeti unapoendesha ndani ya nchi. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Soma zaidi hapa</a></p>"
|
||||
"Overview and filter","Muhtasari na chujio"
|
||||
"Overview and filtering","Muhtasari na uchujaji"
|
||||
"Visual overview","Muhtasari wa kuona"
|
||||
"Filter data types","Chuja aina za data"
|
||||
"Filter observations","Chuja uchunguzi"
|
||||
"Apply filter on observation","Tumia kichujio unapotazama"
|
||||
"Edit and create data","Edit and create data"
|
||||
"Subset, rename and convert variables","Subset, rename and convert variables"
|
||||
"Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.).","Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.)."
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from a continous variable or new variables with R code. At the bottom you can restore the original data.","There are more advanced options to modify factor/categorical variables as well as create new factor from a continous variable or new variables with R code. At the bottom you can restore the original data."
|
||||
"Please note that data modifications are applied before any filtering.","Please note that data modifications are applied before any filtering."
|
||||
"Advanced data manipulation","Advanced data manipulation"
|
||||
"Below options allow more advanced varaible manipulations.","Below options allow more advanced varaible manipulations."
|
||||
|
|
@ -37,8 +36,8 @@
|
|||
"Create a new variable based on an R-expression.","Create a new variable based on an R-expression."
|
||||
"Compare modified data to original","Compare modified data to original"
|
||||
"Raw print of the original vs the modified data.","Raw print of the original vs the modified data."
|
||||
"Original data:","Original data:"
|
||||
"Modified data:","Modified data:"
|
||||
"Original data:","Data asili:"
|
||||
"Modified data:","Data iliyobadilishwa:"
|
||||
"New column name:","New column name:"
|
||||
"Group calculation by:","Group calculation by:"
|
||||
"Enter an expression to define new column:","Enter an expression to define new column:"
|
||||
|
|
@ -50,7 +49,6 @@
|
|||
"Column added!","Column added!"
|
||||
"Unique values:","Unique values:"
|
||||
"Variable to cut:","Variable to cut:"
|
||||
"Number of breaks:","Number of breaks:"
|
||||
"Close intervals on the right","Close intervals on the right"
|
||||
"Include lowest value","Include lowest value"
|
||||
"Create factor variable","Create factor variable"
|
||||
|
|
@ -152,10 +150,7 @@
|
|||
"Settings","Settings"
|
||||
"The following error occured on determining correlations:","The following error occured on determining correlations:"
|
||||
"We encountered the following error creating your report:","We encountered the following error creating your report:"
|
||||
"No variable chosen for analysis","No variable chosen for analysis"
|
||||
"No missing observations","No missing observations"
|
||||
"Missing vs non-missing observations in the variable **'{variabler()}'**","Missing vs non-missing observations in the variable **'{variabler()}'**"
|
||||
"There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}.","There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}."
|
||||
"There is a total of {p_miss} % missing observations.","There is a total of {p_miss} % missing observations."
|
||||
"Median:","Median:"
|
||||
"Restore original data","Restore original data"
|
||||
|
|
@ -248,10 +243,69 @@
|
|||
"Data characteristics table","Data characteristics table"
|
||||
"The dataset without text variables","The dataset without text variables"
|
||||
"Creating the table. Hold on for a moment..","Creating the table. Hold on for a moment.."
|
||||
"Select variable to stratify analysis","Select variable to stratify analysis"
|
||||
"Generating the report. Hold on for a moment..","Generating the report. Hold on for a moment.."
|
||||
"We encountered the following error showing missingness:","We encountered the following error showing missingness:"
|
||||
"We encountered the following error browsing your data:","We encountered the following error browsing your data:"
|
||||
"To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random.","To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random."
|
||||
"Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything.","Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything."
|
||||
"Other","Other"
|
||||
"Hour of the day","Hour of the day"
|
||||
"Breaks","Breaks"
|
||||
"By day of the week","By day of the week"
|
||||
"By weekday","By weekday"
|
||||
"By week number and year","By week number and year"
|
||||
"By week number","By week number"
|
||||
"By month and year","By month and year"
|
||||
"By month only","By month only"
|
||||
"By quarter of the year","By quarter of the year"
|
||||
"By year","By year"
|
||||
"Keep only most common","Keep only most common"
|
||||
"Number","Number"
|
||||
"Combine below percentage","Combine below percentage"
|
||||
"Percentage","Percentage"
|
||||
"By specified numbers","By specified numbers"
|
||||
"By quantiles (groups of equal size)","By quantiles (groups of equal size)"
|
||||
"Please fill in web address and API token, then press 'Connect'.","Please fill in web address and API token, then press 'Connect'."
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.","There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data."
|
||||
"Text or character to split string by","Text or character to split string by"
|
||||
"Split the variable","Split the variable"
|
||||
"Variable to split:","Variable to split:"
|
||||
"Direction:","Direction:"
|
||||
"Split string to multiple columns. Keep number of rows.","Split string to multiple columns. Keep number of rows."
|
||||
"Split string to multiple observations (rows) in the same column. Also ads id and instance columns","Split string to multiple observations (rows) in the same column. Also ads id and instance columns"
|
||||
"Split character string","Split character string"
|
||||
"Split text","Split text"
|
||||
"Split a character string by a common delimiter","Split a character string by a common delimiter"
|
||||
"Select delimiter","Select delimiter"
|
||||
"Browse data preview","Browse data preview"
|
||||
"Original data","Original data"
|
||||
"Preview of result","Preview of result"
|
||||
"No character variables with accepted delimiters detected.","No character variables with accepted delimiters detected."
|
||||
"Split a text column by a recognised delimiter.","Split a text column by a recognised delimiter."
|
||||
"Apply split","Apply split"
|
||||
"Stacked relative barplot","Stacked relative barplot"
|
||||
"Create relative stacked barplots to show the distribution of categorical levels","Create relative stacked barplots to show the distribution of categorical levels"
|
||||
"Side-by-side barplot","Side-by-side barplot"
|
||||
"Create side-by-side barplot to show the distribution of categorical levels","Create side-by-side barplot to show the distribution of categorical levels"
|
||||
"Select table theme","Select table theme"
|
||||
"Level of detail","Level of detail"
|
||||
"Minimal","Minimal"
|
||||
"Extensive","Extensive"
|
||||
"Letters","Letters"
|
||||
"Words","Words"
|
||||
"Shorten to first letters","Shorten to first letters"
|
||||
"Shorten to first words","Shorten to first words"
|
||||
"Missings across variables by the variable **'{input$missings_var}'**","Missings across variables by the variable **'{input$missings_var}'**"
|
||||
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Missing vs non-missing observations in the variable **'{input$missings_var}'**"
|
||||
"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.","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."
|
||||
"Calculating. Hold tight for a moment..","Calculating. Hold tight for a moment.."
|
||||
"Overview of missing observations","Overview of missing observations"
|
||||
"Analysis method for missingness overview","Analysis method for missingness overview"
|
||||
"Overview of missings across variables","Overview of missings across variables"
|
||||
"Overview of difference in variables by missing status in outcome","Overview of difference in variables by missing status in outcome"
|
||||
"Select a variable for grouped overview","Select a variable for grouped overview"
|
||||
"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"
|
||||
|
|
|
|||
|
23
man/collapse_spaces.Rd
Normal file
23
man/collapse_spaces.Rd
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/helpers.R
|
||||
\name{collapse_spaces}
|
||||
\alias{collapse_spaces}
|
||||
\title{Substitue spaces/tabs with single space excluding text within quotes}
|
||||
\usage{
|
||||
collapse_spaces(x, preserve_newlines = TRUE)
|
||||
}
|
||||
\arguments{
|
||||
\item{x}{character string}
|
||||
|
||||
\item{preserve_newlines}{flag to preserve new lines}
|
||||
}
|
||||
\value{
|
||||
character string
|
||||
}
|
||||
\description{
|
||||
Written assisted by Claude.ai. It is long and possibly too complicated,
|
||||
but it works
|
||||
}
|
||||
\examples{
|
||||
collapse_spaces(c("cyl", "di sp","s e d","d e'dl e'"))
|
||||
}
|
||||
|
|
@ -4,7 +4,12 @@
|
|||
\alias{compare_missings}
|
||||
\title{Pairwise comparison of missings across covariables}
|
||||
\usage{
|
||||
compare_missings(data, by_var)
|
||||
compare_missings(
|
||||
data,
|
||||
by_var,
|
||||
max_level = 20,
|
||||
type = c("predictors", "outcome")
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{data}{data frame}
|
||||
|
|
|
|||
|
|
@ -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,8 +9,10 @@ create_baseline(
|
|||
...,
|
||||
by.var,
|
||||
add.p = FALSE,
|
||||
add.diff = FALSE,
|
||||
add.overall = FALSE,
|
||||
theme = c("jama", "lancet", "nejm", "qjecon")
|
||||
theme = c("jama", "lancet", "nejm", "qjecon"),
|
||||
detail_level = c("minimal", "extended")
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
|
|
@ -18,11 +20,15 @@ create_baseline(
|
|||
|
||||
\item{...}{passed as fun.arg to baseline_table()}
|
||||
|
||||
\item{by.var}{specify stratification variable}
|
||||
|
||||
\item{add.p}{add comparison/p-value}
|
||||
|
||||
\item{add.overall}{add overall column}
|
||||
|
||||
\item{strat.var}{grouping/strat variable}
|
||||
\item{theme}{set table theme}
|
||||
|
||||
\item{detail_level}{specify detail level. Either "minimal" or "extended".}
|
||||
}
|
||||
\value{
|
||||
gtsummary table list object
|
||||
|
|
@ -32,5 +38,8 @@ Create a baseline table
|
|||
}
|
||||
\examples{
|
||||
mtcars |> create_baseline(by.var = "gear", add.p = "yes" == "yes")
|
||||
mtcars |> create_baseline(by.var = "gear", detail_level = "extended")
|
||||
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")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/cut-variable-dates.R
|
||||
% Please edit documentation in R/cut-variable-ext.R
|
||||
\name{cut-variable}
|
||||
\alias{cut-variable}
|
||||
\alias{cut_variable_ui}
|
||||
|
|
|
|||
14
man/cut_methods.Rd
Normal file
14
man/cut_methods.Rd
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/cut-variable-ext.R
|
||||
\name{cut_methods}
|
||||
\alias{cut_methods}
|
||||
\title{Library of cut methods with descriptions}
|
||||
\usage{
|
||||
cut_methods()
|
||||
}
|
||||
\value{
|
||||
vector
|
||||
}
|
||||
\description{
|
||||
Library of cut methods with descriptions
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/cut-variable-dates.R
|
||||
% Please edit documentation in R/cut_var.R
|
||||
\name{cut_var}
|
||||
\alias{cut_var}
|
||||
\alias{cut_var.default}
|
||||
|
|
@ -7,6 +7,8 @@
|
|||
\alias{cut_var.POSIXt}
|
||||
\alias{cut_var.POSIXct}
|
||||
\alias{cut_var.Date}
|
||||
\alias{cut_var.factor}
|
||||
\alias{cut_var.character}
|
||||
\title{Extended cutting function with fall-back to the native base::cut}
|
||||
\usage{
|
||||
cut_var(x, ...)
|
||||
|
|
@ -34,17 +36,31 @@ cut_var(x, ...)
|
|||
)
|
||||
|
||||
\method{cut_var}{Date}(x, breaks = NULL, start.on.monday = TRUE, ...)
|
||||
|
||||
\method{cut_var}{factor}(x, breaks = NULL, type = c("top", "bottom"), other = "Other", ...)
|
||||
|
||||
\method{cut_var}{character}(x, breaks = NULL, type = c("characters", "words"), ...)
|
||||
}
|
||||
\arguments{
|
||||
\item{x}{an object inheriting from class "POSIXct"}
|
||||
|
||||
\item{...}{passed on}
|
||||
|
||||
\item{type}{}
|
||||
}
|
||||
\value{
|
||||
factor
|
||||
|
||||
factor
|
||||
|
||||
factor
|
||||
}
|
||||
\description{
|
||||
Extended cutting function with fall-back to the native base::cut
|
||||
|
||||
Simplify a factor to only the top or bottom n levels
|
||||
|
||||
Subset first part of string to factor
|
||||
}
|
||||
\examples{
|
||||
readr::parse_time(c("01:00:20", "03:00:20", "01:20:20", "08:20:20", "21:20:20", "03:02:20")) |> cut_var(2)
|
||||
|
|
@ -57,9 +73,19 @@ readr::parse_time(c("01:00:20", "03:00:20", "01:20:20", "03:02:20", NA)) |> cut_
|
|||
readr::parse_datetime(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(2)
|
||||
readr::parse_datetime(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(breaks = "weekday")
|
||||
readr::parse_datetime(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(breaks = "month_only")
|
||||
readr::parse_datetime(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(breaks=NULL,format = "\%A-\%H")
|
||||
readr::parse_datetime(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(breaks=NULL,format = "\%W")
|
||||
readr::parse_datetime(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(breaks = NULL, format = "\%A-\%H")
|
||||
readr::parse_datetime(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(breaks = NULL, format = "\%W")
|
||||
as.Date(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(2)
|
||||
as.Date(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(breaks = "weekday")
|
||||
as.Date(c("1992-02-01 01:00:20", "1992-02-06 03:00:20", "1992-05-01 01:20:20", "1992-09-01 08:20:20", "1999-02-01 21:20:20", "1992-12-01 03:02:20")) |> cut_var(format = "\%W")
|
||||
mtcars$carb |>
|
||||
as.factor() |>
|
||||
cut_var(2) |>
|
||||
table()
|
||||
|
||||
mtcars$carb |>
|
||||
as.factor() |>
|
||||
cut_var(20, "bottom") |>
|
||||
table()
|
||||
c("Sunday", "This week is short") |> cut_var(breaks = 3)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,13 +6,15 @@
|
|||
\alias{data_missings_server}
|
||||
\title{Data correlations evaluation module}
|
||||
\usage{
|
||||
data_missings_ui(id)
|
||||
data_missings_ui(id, ...)
|
||||
|
||||
data_missings_server(id, data, variable, ...)
|
||||
data_missings_server(id, data, max_level = 20, ...)
|
||||
}
|
||||
\arguments{
|
||||
\item{id}{Module id}
|
||||
|
||||
\item{...}{additional UI elements to show before the table overview}
|
||||
|
||||
\item{data}{data}
|
||||
|
||||
\item{output.format}{output format}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/data_plots.R, R/plot_box.R, R/plot_hbar.R,
|
||||
% R/plot_ridge.R, R/plot_sankey.R, R/plot_scatter.R, R/plot_violin.R
|
||||
% Please edit documentation in R/data_plots.R, R/plot_bar.R, R/plot_box.R,
|
||||
% R/plot_hbar.R, R/plot_ridge.R, R/plot_sankey.R, R/plot_scatter.R,
|
||||
% R/plot_violin.R
|
||||
\name{data-plots}
|
||||
\alias{data-plots}
|
||||
\alias{data_visuals_ui}
|
||||
\alias{data_visuals_server}
|
||||
\alias{create_plot}
|
||||
\alias{plot_bar_single}
|
||||
\alias{plot_box}
|
||||
\alias{plot_box_single}
|
||||
\alias{plot_hbars}
|
||||
|
|
@ -22,6 +24,14 @@ data_visuals_server(id, data, ...)
|
|||
|
||||
create_plot(data, type, pri, sec, ter = NULL, ...)
|
||||
|
||||
plot_bar_single(
|
||||
data,
|
||||
pri,
|
||||
sec = NULL,
|
||||
style = c("stack", "dodge", "fill"),
|
||||
max_level = 30
|
||||
)
|
||||
|
||||
plot_box(data, pri, sec, ter = NULL, ...)
|
||||
|
||||
plot_box_single(data, pri, sec = NULL, seed = 2103)
|
||||
|
|
@ -32,7 +42,15 @@ plot_ridge(data, x, y, z = NULL, ...)
|
|||
|
||||
sankey_ready(data, pri, sec, numbers = "count", ...)
|
||||
|
||||
plot_sankey(data, pri, sec, ter = NULL, color.group = "pri", colors = NULL)
|
||||
plot_sankey(
|
||||
data,
|
||||
pri,
|
||||
sec,
|
||||
ter = NULL,
|
||||
color.group = "pri",
|
||||
colors = NULL,
|
||||
missing.level = "Missing"
|
||||
)
|
||||
|
||||
plot_scatter(data, pri, sec, ter = NULL)
|
||||
|
||||
|
|
@ -52,6 +70,9 @@ plot_violin(data, pri, sec, ter = NULL)
|
|||
\item{sec}{secondary variable}
|
||||
|
||||
\item{ter}{tertiary variable}
|
||||
|
||||
\item{style}{barplot style passed to geom_bar position argument.
|
||||
One of c("stack", "dodge", "fill")}
|
||||
}
|
||||
\value{
|
||||
Shiny ui module
|
||||
|
|
@ -60,6 +81,8 @@ shiny server module
|
|||
|
||||
ggplot2 object
|
||||
|
||||
ggplot object
|
||||
|
||||
ggplot2 object
|
||||
|
||||
ggplot object
|
||||
|
|
@ -81,6 +104,8 @@ Data correlations evaluation module
|
|||
|
||||
Wrapper to create plot based on provided type
|
||||
|
||||
Single vertical barplot
|
||||
|
||||
Beautiful box plot(s)
|
||||
|
||||
Create nice box-plots
|
||||
|
|
@ -99,6 +124,13 @@ Beatiful violin plot
|
|||
}
|
||||
\examples{
|
||||
create_plot(mtcars, "plot_violin", "mpg", "cyl") |> attributes()
|
||||
mtcars |>
|
||||
dplyr::mutate(cyl = factor(cyl), am = factor(am)) |>
|
||||
plot_bar_single(pri = "cyl", sec = "am", style = "fill")
|
||||
|
||||
mtcars |>
|
||||
dplyr::mutate(cyl = factor(cyl), am = factor(am)) |>
|
||||
plot_bar_single(pri = "cyl", style = "stack")
|
||||
mtcars |> plot_box(pri = "mpg", sec = "gear")
|
||||
mtcars |> plot_box(pri = "mpg", sec="cyl")
|
||||
mtcars |>
|
||||
|
|
|
|||
|
|
@ -31,5 +31,5 @@ data.frame
|
|||
Data summary for printing visual summary
|
||||
}
|
||||
\examples{
|
||||
mtcars |> data_summary_gather()
|
||||
mtcars |> data_summary_gather() |> names()
|
||||
}
|
||||
|
|
|
|||
22
man/detect_delimiter.Rd
Normal file
22
man/detect_delimiter.Rd
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/separate_string.R
|
||||
\name{detect_delimiter}
|
||||
\alias{detect_delimiter}
|
||||
\title{Detect delimiters in string based on allowed delimiters}
|
||||
\usage{
|
||||
detect_delimiter(data, delimiters = c("_", "-", ";", "\\n", ","))
|
||||
}
|
||||
\arguments{
|
||||
\item{delimiters}{allowed delimiters}
|
||||
|
||||
\item{text}{character vector}
|
||||
}
|
||||
\value{
|
||||
character vector
|
||||
}
|
||||
\description{
|
||||
Accepts any repeat of delimiters and includes surrounding whitespace
|
||||
}
|
||||
\examples{
|
||||
sapply(c("Walk - run", "Sel__Re", "what;now"), detect_delimiter)
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ Deparses expression as string, substitutes native pipe and adds assign
|
|||
\examples{
|
||||
list(
|
||||
as.symbol(paste0("mtcars$", "mpg")),
|
||||
rlang::call2(.fn = "select", !!!list(c("cyl", "disp")), .ns = "dplyr"),
|
||||
rlang::call2(.fn = "select", !!!list(c("cyl", "di sp")), .ns = "dplyr"),
|
||||
rlang::call2(.fn = "default_parsing", .ns = "FreesearchR")
|
||||
) |>
|
||||
merge_expression() |>
|
||||
|
|
|
|||
35
man/factor_new_levels_labels.Rd
Normal file
35
man/factor_new_levels_labels.Rd
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/update-factor-ext.R
|
||||
\name{factor_new_levels_labels}
|
||||
\alias{factor_new_levels_labels}
|
||||
\title{Simple function to apply new levels and/or labels to factor}
|
||||
\usage{
|
||||
factor_new_levels_labels(
|
||||
data,
|
||||
variable,
|
||||
new_variable = TRUE,
|
||||
new_levels = NULL,
|
||||
new_labels = NULL,
|
||||
ignore = "New label"
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{variable}{factor variable}
|
||||
|
||||
\item{ignore}{character string to ignore in new labels}
|
||||
|
||||
\item{new_level}{new levels, same length as original}
|
||||
|
||||
\item{new_label}{new labels, same length as original}
|
||||
}
|
||||
\value{
|
||||
factor
|
||||
}
|
||||
\description{
|
||||
Simple function to apply new levels and/or labels to factor
|
||||
}
|
||||
\examples{
|
||||
data_n <- mtcars
|
||||
data_n$cyl <- factor(data_n$cyl)
|
||||
factor_new_levels_labels(data_n, "cyl", new_labels = c("four", "New label", "New label"))
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
% Please edit documentation in R/data_plots.R
|
||||
\name{get_label}
|
||||
\alias{get_label}
|
||||
\title{Print label, and if missing print variable name}
|
||||
\title{Print label, and if missing print variable name for plots}
|
||||
\usage{
|
||||
get_label(data, var = NULL)
|
||||
}
|
||||
|
|
@ -15,7 +15,7 @@ get_label(data, var = NULL)
|
|||
character string
|
||||
}
|
||||
\description{
|
||||
Print label, and if missing print variable name
|
||||
Print label, and if missing print variable name for plots
|
||||
}
|
||||
\examples{
|
||||
mtcars |> get_label(var = "mpg")
|
||||
|
|
|
|||
24
man/get_list_elements.Rd
Normal file
24
man/get_list_elements.Rd
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/cut-variable-ext.R
|
||||
\name{get_list_elements}
|
||||
\alias{get_list_elements}
|
||||
\title{Subset elements from list of lists}
|
||||
\usage{
|
||||
get_list_elements(name, element, dict = cut_methods())
|
||||
}
|
||||
\arguments{
|
||||
\item{name}{list name to lookup}
|
||||
|
||||
\item{element}{element to get}
|
||||
|
||||
\item{dict}{dictionary to use}
|
||||
}
|
||||
\value{
|
||||
named vector
|
||||
}
|
||||
\description{
|
||||
General function to sub-setting details stored in list dictionaries.
|
||||
}
|
||||
\examples{
|
||||
get_list_elements(c("top", "bottom"), "descr")
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/cut-variable-dates.R
|
||||
% Please edit documentation in R/cut_var.R
|
||||
\name{is_any_class}
|
||||
\alias{is_any_class}
|
||||
\title{Test class}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/cut-variable-dates.R
|
||||
% Please edit documentation in R/cut_var.R
|
||||
\name{is_datetime}
|
||||
\alias{is_datetime}
|
||||
\title{Test is date/datetime/time}
|
||||
|
|
|
|||
21
man/is_splittable.Rd
Normal file
21
man/is_splittable.Rd
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/separate_string.R
|
||||
\name{is_splittable}
|
||||
\alias{is_splittable}
|
||||
\title{Determine if any variable in data frame character and contains recognized delimiters}
|
||||
\usage{
|
||||
is_splittable(data)
|
||||
}
|
||||
\arguments{
|
||||
\item{data}{vector or data.frame}
|
||||
}
|
||||
\value{
|
||||
logical
|
||||
}
|
||||
\description{
|
||||
Determine if any variable in data frame character and contains recognized delimiters
|
||||
}
|
||||
\examples{
|
||||
any(apply(mtcars, 2, is_splittable))
|
||||
is_splittable(mtcars)
|
||||
}
|
||||
25
man/missings_logic_across.Rd
Normal file
25
man/missings_logic_across.Rd
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/missings-module.R
|
||||
\name{missings_logic_across}
|
||||
\alias{missings_logic_across}
|
||||
\title{Converting all variables to logicals by missing status}
|
||||
\usage{
|
||||
missings_logic_across(data, exclude = NULL)
|
||||
}
|
||||
\arguments{
|
||||
\item{data}{data}
|
||||
|
||||
\item{exclude}{character vector of variable names to be excluded}
|
||||
}
|
||||
\value{
|
||||
data frame
|
||||
}
|
||||
\description{
|
||||
Converting all variables to logicals by missing status
|
||||
}
|
||||
\examples{
|
||||
mtcars |> missings_logic_across("cyl")
|
||||
## gtsummary::trial |>
|
||||
## missings_logic_across() |>
|
||||
## gtsummary::tbl_summary()
|
||||
}
|
||||
20
man/names2val.Rd
Normal file
20
man/names2val.Rd
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/cut-variable-ext.R
|
||||
\name{names2val}
|
||||
\alias{names2val}
|
||||
\title{Set values as names and names as values}
|
||||
\usage{
|
||||
names2val(data)
|
||||
}
|
||||
\arguments{
|
||||
\item{data}{data}
|
||||
}
|
||||
\value{
|
||||
named vector
|
||||
}
|
||||
\description{
|
||||
Set values as names and names as values
|
||||
}
|
||||
\examples{
|
||||
names2val(c("Cylinders" = "cyl", "Transmission" = "am", "Gears" = "gear"))
|
||||
}
|
||||
|
|
@ -10,6 +10,7 @@ plot_sankey_single(
|
|||
sec,
|
||||
color.group = c("pri", "sec"),
|
||||
colors = NULL,
|
||||
missing.level = "Missing",
|
||||
...
|
||||
)
|
||||
}
|
||||
|
|
@ -40,4 +41,7 @@ data.frame(
|
|||
mtcars |>
|
||||
default_parsing() |>
|
||||
plot_sankey_single("cyl", "vs", color.group = "pri")
|
||||
stRoke::trial |>
|
||||
default_parsing() |>
|
||||
plot_sankey_single("diabetes", "hypertension")
|
||||
}
|
||||
|
|
|
|||
23
man/separate_string.Rd
Normal file
23
man/separate_string.Rd
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/separate_string.R
|
||||
\name{separate_string}
|
||||
\alias{separate_string}
|
||||
\title{Separate string wide or long}
|
||||
\usage{
|
||||
separate_string(data, col, delim, direction = c("wide", "long"))
|
||||
}
|
||||
\arguments{
|
||||
\item{data}{data}
|
||||
|
||||
\item{col}{column}
|
||||
|
||||
\item{delim}{delimiter}
|
||||
|
||||
\item{direction}{target direction}
|
||||
}
|
||||
\value{
|
||||
data.frame
|
||||
}
|
||||
\description{
|
||||
Separate string wide or long
|
||||
}
|
||||
44
man/split-string.Rd
Normal file
44
man/split-string.Rd
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/separate_string.R
|
||||
\name{split-string}
|
||||
\alias{split-string}
|
||||
\alias{string_split_ui}
|
||||
\alias{string_split_server}
|
||||
\alias{modal_string_split}
|
||||
\title{String split module based on tidyr::separate_}
|
||||
\usage{
|
||||
string_split_ui(id)
|
||||
|
||||
string_split_server(id, data_r = reactive(NULL))
|
||||
|
||||
modal_string_split(
|
||||
id,
|
||||
title = i18n$t("Split character string"),
|
||||
easyClose = TRUE,
|
||||
size = "xl",
|
||||
footer = NULL
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{id}{id}
|
||||
|
||||
\item{data_r}{reactive data}
|
||||
|
||||
\item{title}{Modal title}
|
||||
|
||||
\item{easyClose}{easyClose}
|
||||
|
||||
\item{size}{size}
|
||||
|
||||
\item{footer}{footer}
|
||||
}
|
||||
\value{
|
||||
A shiny ui module
|
||||
|
||||
shiny module server
|
||||
|
||||
shiny modal
|
||||
}
|
||||
\description{
|
||||
String split module based on tidyr::separate_
|
||||
}
|
||||
25
man/unique_names.Rd
Normal file
25
man/unique_names.Rd
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/update-factor-ext.R
|
||||
\name{unique_names}
|
||||
\alias{unique_names}
|
||||
\title{Make unique variable names}
|
||||
\usage{
|
||||
unique_names(new, existing = character())
|
||||
}
|
||||
\arguments{
|
||||
\item{new}{a vector of proposed new variable names}
|
||||
|
||||
\item{existing}{a vector of existing variable names}
|
||||
}
|
||||
\value{
|
||||
a vector of unique new variable names
|
||||
}
|
||||
\description{
|
||||
Helper function to create new variable names that are unique
|
||||
given a set of existing names (in a data set, for example).
|
||||
If a variable name already exists, a number will be appended.
|
||||
}
|
||||
\examples{
|
||||
unique_names(c("var_x", "var_y", "var_x"), c("var_x", "var_z"))
|
||||
|
||||
}
|
||||
|
|
@ -37,30 +37,30 @@ A selectizeInput customized for named vectors
|
|||
}
|
||||
\examples{
|
||||
if (shiny::interactive()) {
|
||||
shinyApp(
|
||||
ui = fluidPage(
|
||||
shiny::uiOutput("select"),
|
||||
tableOutput("data")
|
||||
),
|
||||
server = function(input, output) {
|
||||
output$select <- shiny::renderUI({
|
||||
vectorSelectInput(
|
||||
inputId = "variable", label = "Variable:",
|
||||
data = c(
|
||||
"Cylinders" = "cyl",
|
||||
"Transmission" = "am",
|
||||
"Gears" = "gear"
|
||||
shinyApp(
|
||||
ui = fluidPage(
|
||||
shiny::uiOutput("select"),
|
||||
tableOutput("data")
|
||||
),
|
||||
server = function(input, output) {
|
||||
output$select <- shiny::renderUI({
|
||||
vectorSelectInput(
|
||||
inputId = "variable", label = "Variable:",
|
||||
data = c(
|
||||
"Cylinders" = "cyl",
|
||||
"Transmission" = "am",
|
||||
"Gears" = "gear"
|
||||
)
|
||||
)
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
output$data <- renderTable(
|
||||
{
|
||||
mtcars[, c("mpg", input$variable), drop = FALSE]
|
||||
},
|
||||
rownames = TRUE
|
||||
)
|
||||
}
|
||||
)
|
||||
output$data <- renderTable(
|
||||
{
|
||||
mtcars[, c("mpg", input$variable), drop = FALSE]
|
||||
},
|
||||
rownames = TRUE
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ shiny server
|
|||
|
||||
shiny modal
|
||||
|
||||
An \code{\link[=apexchart]{apexchart()}} \code{htmlwidget} object.
|
||||
An \code{\link[apexcharter:apexchart]{apexcharter::apexchart()}} \code{htmlwidget} object.
|
||||
|
||||
ggplot2 object
|
||||
}
|
||||
|
|
@ -69,51 +69,3 @@ Plot missings and class with apexcharter. Not in use with FreesearchR.
|
|||
|
||||
Ggplot2 data summary visualisation based on visdat::vis_dat.
|
||||
}
|
||||
\examples{
|
||||
visual_summary_demo_app <- function() {
|
||||
ui <- shiny::fluidPage(
|
||||
shiny::actionButton(
|
||||
inputId = "modal_missings",
|
||||
label = "Visual summary",
|
||||
width = "100\%",
|
||||
disabled = FALSE
|
||||
)
|
||||
)
|
||||
server <- function(input, output, session) {
|
||||
data_demo <- mtcars
|
||||
data_demo[sample(1:32, 10), "cyl"] <- NA
|
||||
data_demo[sample(1:32, 8), "vs"] <- NA
|
||||
data_demo$gear <- factor(data_demo$gear)
|
||||
|
||||
visual_summary_server(id = "data", data = shiny::reactive(data_demo),summary.fun=class)
|
||||
|
||||
observeEvent(input$modal_missings, {
|
||||
tryCatch(
|
||||
{
|
||||
modal_visual_summary(id = "data")
|
||||
},
|
||||
error = function(err) {
|
||||
showNotification(paste0("We encountered the following error browsing your data: ", err), type = "err")
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
shiny::shinyApp(ui, server)
|
||||
}
|
||||
|
||||
visual_summary_demo_app()
|
||||
data_demo <- mtcars
|
||||
data_demo[2:4, "cyl"] <- NA
|
||||
rbind(data_demo, data_demo, data_demo, data_demo) |> missings_apex_plot()
|
||||
data_demo |> missings_apex_plot()
|
||||
mtcars |> missings_apex_plot(animation = TRUE)
|
||||
# dplyr::storms |> missings_apex_plot()
|
||||
visdat::vis_dat(dplyr::storms)
|
||||
data_demo <- mtcars
|
||||
data_demo[sample(1:32, 10), "cyl"] <- NA
|
||||
data_demo[sample(1:32, 8), "vs"] <- NA
|
||||
visual_summary(data_demo)
|
||||
visual_summary(data_demo, palette.fun = scales::hue_pal())
|
||||
visual_summary(dplyr::storms, summary.fun = data_type)
|
||||
visual_summary(dplyr::storms, summary.fun = data_type, na.label = "Missings", legend.title = "Class")
|
||||
}
|
||||
|
|
|
|||
1184
renv.lock
1184
renv.lock
File diff suppressed because one or more lines are too long
|
|
@ -10,4 +10,9 @@ library(testthat)
|
|||
library(FreesearchR)
|
||||
library(shiny)
|
||||
|
||||
|
||||
i18n <- shiny.i18n::Translator$new(translation_csvs_path = here::here("inst/translations/"))
|
||||
i18n$set_translation_language("en")
|
||||
|
||||
|
||||
test_check("FreesearchR")
|
||||
|
|
|
|||
|
|
@ -7,163 +7,6 @@ vignette: >
|
|||
%\VignetteEncoding{UTF-8}
|
||||
---
|
||||
|
||||
```{r setup, include=FALSE}
|
||||
knitr::opts_chunk$set(echo = TRUE,eval = TRUE)
|
||||
library(FreesearchR)
|
||||
i18n_path <- system.file("translations", package = "FreesearchR")
|
||||
i18n <- shiny.i18n::Translator$new(translation_csvs_path = i18n_path)
|
||||
i18n$set_translation_language("en")
|
||||
```
|
||||
Documentation on getting started using the FreesearchR app can be found in the [FreesearchR project documentations (link)](https://freesearchr.github.io/FreesearchR-knowledge/app/app.html).
|
||||
|
||||
# Getting started with ***FreesearchR***
|
||||
|
||||
Below is a simple walk-trough and basic descriptions on the different features of the ***FreesearchR*** app.
|
||||
|
||||
## Launching
|
||||
|
||||
The easiest way to get started is to launch [the onlie version of the app (click this link)](https://app.freesearchr.org/). Please be aware not to upload sensitive data in this version as data security can not be guaranteed in this online environment. The app can easily be run from *R* on your own computer by running the code below ([read more on running locally here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine)):
|
||||
|
||||
```{r eval = FALSE}
|
||||
require("pak")
|
||||
pak::pak("agdamsbo/FreesearchR")
|
||||
library(FreesearchR)
|
||||
FreesearchR::launch_FreesearchR()
|
||||
```
|
||||
|
||||
As a small note, a standalone Windows app version is on the drawing board as well, but no time frame is currently available.
|
||||
|
||||
## Get started
|
||||
|
||||
Once in the app, get started by loading your data. You have three options available for importing data: file upload, REDCap server export and local or sample data.
|
||||
|
||||
After choosing a data source nad importing data, you can preview the basic data structure and missing observations, set a threshold to filter data by completeness and further manually specify variables to include for analyses.
|
||||
|
||||
### File upload
|
||||
|
||||
Several data file formats are supported for easy import (csv, txt, xls(x), ods, rds, dta). If importing workbooks (xls(x) or ods), you are prompted to specify sheet(s) to import. If choosing multiple sheets, these are automatically merged by common variable(s), so please make sure that key/ID variables are correctly named identically.
|
||||
|
||||
### REDCap server export
|
||||
|
||||
Export data directly from a REDCap server. You need to first generate an API-token ([see these instruction](https://confluence.research.cchmc.org/pages/viewpage.action?pageId=50987698)) in REDCap. Make sure you have the necessary rights to do so.
|
||||
|
||||
Please don't store the API-key on your device unless encrypted or in a keyring, as this may compromise data safety. Log in to your REDCap server and retrieve the token when needed.
|
||||
|
||||
Type the correct web address of your REDCap server.
|
||||
|
||||
The module will validate the information and you can click "Connect".
|
||||
|
||||
This will unfold options to preview your data dictionary (the main database metadata), choose fields/variables to download as well as filtering options.
|
||||
|
||||
### Local or sample data
|
||||
|
||||
When opening the online hosted app, you can load some sample data to try out the app. When running the app locally from *R* on your own computer, you will find all data frames loaded in your environment here. This extends the possible uses of this app to allow for quick and easy data insights and code generation.
|
||||
|
||||
## Prepare
|
||||
|
||||
This is the panel to prepare data for evaluation and analyses and get a good overview of your data, check data is classed and formatted correctly, perform simple modifications and filter data.
|
||||
|
||||
### Summary
|
||||
|
||||
Here, the data variables can be inspected with a simple visualisation and a few key measures. Also, data filtering is available at two levels:
|
||||
|
||||
- Data type filtering allows to filter by variable [data type](https://agdamsbo.github.io/FreesearchR/articles/data-types.html)
|
||||
|
||||
- Observations level filtering allow to filter data by variable
|
||||
|
||||
### Modify
|
||||
|
||||
Re-class, rename, and relabel variables. Subset data, create new variables and reorder factor levels. Also, compare the modified dataset to the original and restore the original data.
|
||||
|
||||
## Evaluate
|
||||
|
||||
This panel allows for basic data evaluation.
|
||||
|
||||
### Characteristics
|
||||
|
||||
Create a classical baseline characteristics table with optional data stratification and comparisons.
|
||||
|
||||
### Correlation matrix
|
||||
|
||||
Visualise variable correlations and get suggestions to exclude highly correlated variables.
|
||||
|
||||
## Visuals
|
||||
|
||||
There are a number of plotting options to visualise different aspects of the data.
|
||||
|
||||
Below are the available plot types listed.
|
||||
|
||||
```{r echo = FALSE}
|
||||
c("continuous", "dichotomous", "categorical") |>
|
||||
lapply(\(.x){
|
||||
dplyr::bind_cols(
|
||||
dplyr::tibble("Data type"=.x),
|
||||
supported_plots() |>
|
||||
lapply(\(.y){
|
||||
if (.x %in% .y$primary.type){
|
||||
.y[c("descr","note")]|> dplyr::bind_cols()
|
||||
}
|
||||
})|>
|
||||
dplyr::bind_rows() |>
|
||||
setNames(c("Plot type","Description")))
|
||||
}) |>
|
||||
dplyr::bind_rows() |>
|
||||
# toastui::datagrid(filters=TRUE,theme="striped") |>
|
||||
knitr::kable()
|
||||
```
|
||||
|
||||
Export the plots directly from the sidebar with easily adjusted plot dimensions for your next publication.
|
||||
|
||||
Also copy the code to generate the plot in your own R-environment and fine tune all the small details.
|
||||
|
||||
## Regression
|
||||
|
||||
This section is only intended for very simple explorative analyses and as a proof-of-concept for now. If you are doing complex regression analyses you should probably just write the code yourself.
|
||||
|
||||
Below are the available regression types listed.
|
||||
|
||||
```{r echo = FALSE}
|
||||
c("continuous", "dichotomous", "categorical") |>
|
||||
lapply(\(.x){
|
||||
dplyr::bind_cols(
|
||||
dplyr::tibble("Data type"=.x),
|
||||
supported_functions()|>
|
||||
lapply(\(.y){
|
||||
if (.x %in% .y$out.type){
|
||||
.y[c("descr","fun","design")]|> dplyr::bind_cols()
|
||||
}
|
||||
})|>
|
||||
dplyr::bind_rows() |>
|
||||
setNames(c("Regression model","Function","Study design")))
|
||||
}) |>
|
||||
dplyr::bind_rows() |>
|
||||
# toastui::datagrid(filters=TRUE,theme="striped") |>
|
||||
knitr::kable()
|
||||
```
|
||||
|
||||
### Table
|
||||
|
||||
Generate simple regression models and get the results in a nice table. This will also be included in the exported report.
|
||||
|
||||
This will generate a combined table with both univariate regression model results for each included variable and a multivariate model with all variables included for explorative analyses.
|
||||
|
||||
### Plots
|
||||
|
||||
Plot the coefficients from the regression models in a forest plot. Choose which model(s) to include.
|
||||
|
||||
### Model checks
|
||||
|
||||
Check model assumptions visually. Supported checks can be chosen.
|
||||
|
||||
## Download
|
||||
|
||||
### Report
|
||||
|
||||
Download a nice report with baseline characteristics and regression model results. Choose between MS Word or LibreOffice format.
|
||||
|
||||
### Data
|
||||
|
||||
Export the modified dataset in different formats.
|
||||
|
||||
### Code
|
||||
|
||||
See all the code snippets from the different steps in your data evaluation.
|
||||
|
|
|
|||
|
|
@ -16,23 +16,4 @@ knitr::opts_chunk$set(
|
|||
options(rmarkdown.html_vignette.check_title = FALSE)
|
||||
```
|
||||
|
||||
```{r setup}
|
||||
library(FreesearchR)
|
||||
i18n_path <- system.file("translations", package = "FreesearchR")
|
||||
i18n <- shiny.i18n::Translator$new(translation_csvs_path = i18n_path)
|
||||
i18n$set_translation_language("en")
|
||||
```
|
||||
|
||||
## A clinical data class
|
||||
|
||||
Traditionally in *R*, data is identified by classes, like numeric, integer, double, logical, factor etc. These classes can be a little confusing from a clinical or operational standpoint. In the ***FreesearchR*** app, these classes has been simplified and modified to the following data types, that are assigned on a prioritised order like the following:
|
||||
|
||||
```{r echo = FALSE}
|
||||
data_types() |> purrr::imap(\(.x,.i){
|
||||
dplyr::bind_cols("type"=.i,.x,.name_repair = "unique_quiet")
|
||||
}) |> dplyr::bind_rows() |>
|
||||
setNames(c("Data type","Description","Data classes included")) |>
|
||||
knitr::kable()
|
||||
```
|
||||
|
||||
Categorising data in this way makes sense when making choices on how to evaluate and analyse data. This is used throughout the ***FreesearchR*** app to simplify data handling.
|
||||
Documentation on the data types used in FreesearchR can be found in the [FreesearchR project documentations (link)](https://freesearchr.github.io/FreesearchR-knowledge/app/data_types.html).
|
||||
|
|
|
|||
|
|
@ -15,12 +15,4 @@ knitr::opts_chunk$set(
|
|||
options(rmarkdown.html_vignette.check_title = FALSE)
|
||||
```
|
||||
|
||||
```{r setup}
|
||||
library(FreesearchR)
|
||||
```
|
||||
|
||||
## Considering missing observations
|
||||
|
||||
### Further reading
|
||||
|
||||
The authors behind the [{finalfit}-package](https://finalfit.org/index.html) have shared a very comprehensive article on what to do and think about missing observations in your data. Please [have a look here](https://finalfit.org/articles/missing.html).
|
||||
Considerations of data missingness can be found in the [FreesearchR project documentations (link)](https://freesearchr.github.io/FreesearchR-knowledge/intro/missingness.html).
|
||||
|
|
|
|||
|
|
@ -16,44 +16,4 @@ knitr::opts_chunk$set(
|
|||
options(rmarkdown.html_vignette.check_title = FALSE)
|
||||
```
|
||||
|
||||
```{r setup}
|
||||
library(FreesearchR)
|
||||
i18n_path <- system.file("translations", package = "FreesearchR")
|
||||
i18n <- shiny.i18n::Translator$new(translation_csvs_path = i18n_path)
|
||||
i18n$set_translation_language("en")
|
||||
```
|
||||
|
||||
## Basic visualisations
|
||||
|
||||
The goal of ***FreesearchR*** is to keep things simple. Visuals can get very complicated. We provide a selection of plots, that helps visualise typical clinical and will be enough for most use cases, and for publishing to most journals.
|
||||
|
||||
If you want to go further, have a look at these sites with suggestions and sample code for data plotting:
|
||||
|
||||
- [*R* Charts](https://r-charts.com/): Extensive gallery with great plots
|
||||
|
||||
- [*R* Graph gallery](https://r-graph-gallery.com/): Another gallery with great graphs
|
||||
|
||||
- [graphics principles](https://graphicsprinciples.github.io/): Easy to follow recommendations for clear visuals.
|
||||
|
||||
|
||||
### Available plots
|
||||
|
||||
Below are the available plot types listed.
|
||||
|
||||
```{r echo = FALSE}
|
||||
c("continuous", "dichotomous", "categorical") |>
|
||||
lapply(\(.x){
|
||||
dplyr::bind_cols(
|
||||
dplyr::tibble("Data type"=.x),
|
||||
supported_plots() |>
|
||||
lapply(\(.y){
|
||||
if (.x %in% .y$primary.type){
|
||||
.y[c("descr","note")]|> dplyr::bind_cols()
|
||||
}
|
||||
})|>
|
||||
dplyr::bind_rows() |>
|
||||
setNames(c("Plot type","Description")))
|
||||
}) |>
|
||||
dplyr::bind_rows() |>
|
||||
knitr::kable()
|
||||
```
|
||||
Documentation on visuals used in FreesearchR can be found in the [FreesearchR project documentations (link)](https://freesearchr.github.io/FreesearchR-knowledge/app/visuals.html).
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue