new renders

This commit is contained in:
Andreas Gammelgaard Damsbo 2026-05-30 19:59:31 +02:00
commit ab3df0eda6
No known key found for this signature in database
22 changed files with 97 additions and 38 deletions

View file

@ -1,6 +1,6 @@
Package: FreesearchR Package: FreesearchR
Title: Easy data analysis for clinicians Title: Easy data analysis for clinicians
Version: 26.4.2 Version: 26.5.1
Authors@R: c( Authors@R: c(
person("Andreas Gammelgaard", "Damsbo",email="agdamsbo@clin.au.dk", role = c("aut", "cre"), person("Andreas Gammelgaard", "Damsbo",email="agdamsbo@clin.au.dk", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-7559-1154")), comment = c(ORCID = "0000-0002-7559-1154")),
@ -118,6 +118,7 @@ Collate:
'launch_FreesearchR.R' 'launch_FreesearchR.R'
'missings-module.R' 'missings-module.R'
'plot-download-module.R' 'plot-download-module.R'
'plot-helpers.R'
'plot_bar.R' 'plot_bar.R'
'plot_box.R' 'plot_box.R'
'plot_euler.R' 'plot_euler.R'

View file

@ -16,6 +16,7 @@ export(append_column)
export(append_list) export(append_list)
export(apply_labels) export(apply_labels)
export(argsstring2list) export(argsstring2list)
export(available_plots)
export(baseline_table) export(baseline_table)
export(class_icons) export(class_icons)
export(clean_common_axis) export(clean_common_axis)
@ -64,6 +65,7 @@ export(format_writer)
export(generate_colors) export(generate_colors)
export(get_data_packages) export(get_data_packages)
export(get_fun_options) export(get_fun_options)
export(get_input_params)
export(get_label) export(get_label)
export(get_list_elements) export(get_list_elements)
export(get_plot_options) export(get_plot_options)

View file

@ -1,3 +1,7 @@
# FreesearchR 26.5.1
*NEW* The visuals module has been restructured to allow for more advanced inputs, which will be added in the future. Basically a more future proof design allowing for more adjustments, while striving to keep the simplicity. Have fun!
# FreesearchR 26.4.2 # FreesearchR 26.4.2
Bug fixes and revised color choices. Bug fixes and revised color choices.

View file

@ -1 +1 @@
hosted_version <- function()'v26.4.2-260528' hosted_version <- function()'v26.4.2-260530'

View file

@ -76,7 +76,7 @@ vertical_stacked_bars <- function(data,
colors <- generate_colors(n = nrow(df.table), palette = color.palette) colors <- generate_colors(n = nrow(df.table), palette = color.palette)
## Colors are reversed by default as that usually gives the best result ## Colors are reversed by default as that usually gives the best result
if (isTRUE(reverse)) { if (isTRUE(reverse) | reverse=="TRUE") {
colors <- rev(colors) colors <- rev(colors)
} }

View file

@ -89,7 +89,6 @@
"and","og" "and","og"
"from each pair","fra hvert par" "from each pair","fra hvert par"
"Plot","Tegn" "Plot","Tegn"
"Adjust settings, then press ""Plot"".","Juster indstillingerne og tryk så ""Tegn""."
"Plot height (mm)","Højde af grafik (mm)" "Plot height (mm)","Højde af grafik (mm)"
"Plot width (mm)","Bredde af grafik (mm)" "Plot width (mm)","Bredde af grafik (mm)"
"File format","File format" "File format","File format"
@ -97,12 +96,7 @@
"Select variable","Vælg variabel" "Select variable","Vælg variabel"
"Response variable","Svarvariable" "Response variable","Svarvariable"
"Plot type","Type af grafik" "Plot type","Type af grafik"
"Please select","Vælg"
"Additional variables","Yderligere variabler"
"Secondary variable","Sekundær variabel"
"No variable","Ingen variabel" "No variable","Ingen variabel"
"Grouping variable","Variabel til gruppering"
"No stratification","Ingen stratificering"
"Drawing the plot. Hold tight for a moment..","Tegner grafikken. Spænd selen.." "Drawing the plot. Hold tight for a moment..","Tegner grafikken. Spænd selen.."
"#Plotting\n","#Tegner\n" "#Plotting\n","#Tegner\n"
"Stacked horizontal bars","Stablede horisontale søjler" "Stacked horizontal bars","Stablede horisontale søjler"
@ -310,7 +304,6 @@
"Sample data","Sample data" "Sample data","Sample data"
"Settings","Settings" "Settings","Settings"
"Create new factor","Create new factor" "Create new factor","Create new factor"
"Choose color palette","Choose color palette"
"Optional filter logic (e.g., [gender] = 'female')","Optional filter logic (e.g., [gender] = 'female')" "Optional filter logic (e.g., [gender] = 'female')","Optional filter logic (e.g., [gender] = 'female')"
"Drop empty","Drop empty" "Drop empty","Drop empty"
"Choose variable:","Choose variable:" "Choose variable:","Choose variable:"

1 en da
89 and og
90 from each pair fra hvert par
91 Plot Tegn
Adjust settings, then press "Plot". Juster indstillingerne og tryk så "Tegn".
92 Plot height (mm) Højde af grafik (mm)
93 Plot width (mm) Bredde af grafik (mm)
94 File format File format
96 Select variable Vælg variabel
97 Response variable Svarvariable
98 Plot type Type af grafik
Please select Vælg
Additional variables Yderligere variabler
Secondary variable Sekundær variabel
99 No variable Ingen variabel
Grouping variable Variabel til gruppering
No stratification Ingen stratificering
100 Drawing the plot. Hold tight for a moment.. Tegner grafikken. Spænd selen..
101 #Plotting\n #Tegner\n
102 Stacked horizontal bars Stablede horisontale søjler
304 Sample data Sample data
305 Settings Settings
306 Create new factor Create new factor
Choose color palette Choose color palette
307 Optional filter logic (e.g., ⁠[gender] = 'female') Optional filter logic (e.g., ⁠[gender] = 'female')
308 Drop empty Drop empty
309 Choose variable: Choose variable:

View file

@ -89,7 +89,6 @@
"and","na" "and","na"
"from each pair","kutoka kwa kila jozi" "from each pair","kutoka kwa kila jozi"
"Plot","Kipande cha habari" "Plot","Kipande cha habari"
"Adjust settings, then press ""Plot"".","Rekebisha mipangilio, kisha bonyeza ""Plot""."
"Plot height (mm)","Urefu wa kiwanja (mm)" "Plot height (mm)","Urefu wa kiwanja (mm)"
"Plot width (mm)","Upana wa kiwanja (mm)" "Plot width (mm)","Upana wa kiwanja (mm)"
"File format","Umbizo la faili" "File format","Umbizo la faili"
@ -97,12 +96,7 @@
"Select variable","Chagua kigezo" "Select variable","Chagua kigezo"
"Response variable","Kigezo cha majibu" "Response variable","Kigezo cha majibu"
"Plot type","Aina ya kiwanja" "Plot type","Aina ya kiwanja"
"Please select","Tafadhali chagua"
"Additional variables","Vigezo vya ziada"
"Secondary variable","Kigezo cha pili"
"No variable","Hakuna kigezo" "No variable","Hakuna kigezo"
"Grouping variable","Kigezo cha kuweka katika makundi"
"No stratification","Hakuna matabaka"
"Drawing the plot. Hold tight for a moment..","Kuchora njama. Shikilia kwa muda.." "Drawing the plot. Hold tight for a moment..","Kuchora njama. Shikilia kwa muda.."
"#Plotting\n","#Upangaji\n" "#Plotting\n","#Upangaji\n"
"Stacked horizontal bars","Pau za mlalo zilizopangwa kwa mpangilio" "Stacked horizontal bars","Pau za mlalo zilizopangwa kwa mpangilio"
@ -310,7 +304,6 @@
"Sample data","Sample data" "Sample data","Sample data"
"Settings","Settings" "Settings","Settings"
"Create new factor","Create new factor" "Create new factor","Create new factor"
"Choose color palette","Choose color palette"
"Optional filter logic (e.g., [gender] = 'female')","Optional filter logic (e.g., [gender] = 'female')" "Optional filter logic (e.g., [gender] = 'female')","Optional filter logic (e.g., [gender] = 'female')"
"Drop empty","Drop empty" "Drop empty","Drop empty"
"Choose variable:","Choose variable:" "Choose variable:","Choose variable:"

1 en sw
89 and na
90 from each pair kutoka kwa kila jozi
91 Plot Kipande cha habari
Adjust settings, then press "Plot". Rekebisha mipangilio, kisha bonyeza "Plot".
92 Plot height (mm) Urefu wa kiwanja (mm)
93 Plot width (mm) Upana wa kiwanja (mm)
94 File format Umbizo la faili
96 Select variable Chagua kigezo
97 Response variable Kigezo cha majibu
98 Plot type Aina ya kiwanja
Please select Tafadhali chagua
Additional variables Vigezo vya ziada
Secondary variable Kigezo cha pili
99 No variable Hakuna kigezo
Grouping variable Kigezo cha kuweka katika makundi
No stratification Hakuna matabaka
100 Drawing the plot. Hold tight for a moment.. Kuchora njama. Shikilia kwa muda..
101 #Plotting\n #Upangaji\n
102 Stacked horizontal bars Pau za mlalo zilizopangwa kwa mpangilio
304 Sample data Sample data
305 Settings Settings
306 Create new factor Create new factor
Choose color palette Choose color palette
307 Optional filter logic (e.g., ⁠[gender] = 'female') Optional filter logic (e.g., ⁠[gender] = 'female')
308 Drop empty Drop empty
309 Choose variable: Choose variable:

View file

@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_plots.R % Please edit documentation in R/plot-helpers.R
\name{align_axes} \name{align_axes}
\alias{align_axes} \alias{align_axes}
\title{Aligns axes between plots} \title{Aligns axes between plots}

View file

@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_plots.R % Please edit documentation in R/plot-helpers.R
\name{all_but} \name{all_but}
\alias{all_but} \alias{all_but}
\title{Select all from vector but} \title{Select all from vector but}

27
man/available_plots.Rd Normal file
View file

@ -0,0 +1,27 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-helpers.R
\name{available_plots}
\alias{available_plots}
\title{Implemented functions}
\usage{
available_plots()
}
\value{
list
}
\description{
Library of supported functions. The list name and "descr" element should be
unique for each element on list.
\itemize{
\item fun: the plotting function
\item fun.args: default parameters for the plotting function
\item descr: Plot description
\item note: Short note/description of the function for displaying in ui and docs
\item primary.type: Primary variable data type (see \link{data_type})
\item base: holds a list of parameters for plot input fields generation
Secondary and tertiary variable input fields are mandatory.
}
}
\examples{
available_plots() |> str()
}

View file

@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_plots.R % Please edit documentation in R/plot-helpers.R
\name{clean_common_axis} \name{clean_common_axis}
\alias{clean_common_axis} \alias{clean_common_axis}
\title{Extract and clean axis ranges} \title{Extract and clean axis ranges}

View file

@ -1,7 +1,7 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_plots.R, R/plot_bar.R, R/plot_box.R, % Please edit documentation in R/data_plots.R, R/plot-helpers.R, R/plot_bar.R,
% R/plot_hbar.R, R/plot_likert.R, R/plot_ridge.R, R/plot_sankey.R, % R/plot_box.R, R/plot_hbar.R, R/plot_likert.R, R/plot_ridge.R,
% R/plot_scatter.R, R/plot_violin.R % R/plot_sankey.R, R/plot_scatter.R, R/plot_violin.R
\name{data-plots} \name{data-plots}
\alias{data-plots} \alias{data-plots}
\alias{data_visuals_ui} \alias{data_visuals_ui}
@ -22,7 +22,7 @@
\usage{ \usage{
data_visuals_ui(id, tab_title = "Plots", ...) data_visuals_ui(id, tab_title = "Plots", ...)
data_visuals_server(id, data, palettes, ...) data_visuals_server(id, data, palettes = color_choices(), ...)
create_plot(data, type, pri, sec, ter = NULL, color.palette = "viridis", ...) create_plot(data, type, pri, sec, ter = NULL, color.palette = "viridis", ...)
@ -50,9 +50,9 @@ plot_box(data, pri, sec, ter = NULL, color.palette = "viridis", ...)
plot_box_single(data, pri, sec = NULL, seed = 2103, color.palette = "viridis") plot_box_single(data, pri, sec = NULL, seed = 2103, color.palette = "viridis")
plot_hbars(data, pri, sec, ter = NULL, color.palette = "viridis") plot_hbars(data, pri, sec, ter = NULL, color.palette = "viridis", ...)
plot_likert(data, pri, sec = NULL, ter = NULL, color.palette = "viridis") plot_likert(data, pri, sec = NULL, ter = NULL, color.palette = "viridis", ...)
plot_ridge(data, x, y, z = NULL, color.palette = "viridis", ...) plot_ridge(data, x, y, z = NULL, color.palette = "viridis", ...)
@ -69,12 +69,13 @@ plot_sankey(
default.color = "#2986cc", default.color = "#2986cc",
box.color = "#1E4B66", box.color = "#1E4B66",
na.color = "grey80", na.color = "grey80",
missing.level = "Missing" missing.level = "Missing",
...
) )
plot_scatter(data, pri, sec, ter = NULL, color.palette = "viridis") plot_scatter(data, pri, sec, ter = NULL, color.palette = "viridis", ...)
plot_violin(data, pri, sec, ter = NULL, color.palette = "viridis") plot_violin(data, pri, sec, ter = NULL, color.palette = "viridis", ...)
} }
\arguments{ \arguments{
\item{id}{Module id. (Use 'ns("id")')} \item{id}{Module id. (Use 'ns("id")')}

27
man/get_input_params.Rd Normal file
View file

@ -0,0 +1,27 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-helpers.R
\name{get_input_params}
\alias{get_input_params}
\title{Get the function parameters based on the selected function description}
\usage{
get_input_params(data)
}
\arguments{
\item{data}{vector}
}
\value{
list
}
\description{
Get the function parameters based on the selected function description
}
\examples{
ls <- mtcars |>
default_parsing() |>
dplyr::pull(mpg) |>
possible_plots() |>
(\(.x){
.x[[1]]
})() |>
get_input_params()
}

View file

@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_plots.R % Please edit documentation in R/plot-helpers.R
\name{get_label} \name{get_label}
\alias{get_label} \alias{get_label}
\title{Print label, and if missing print variable name for plots} \title{Print label, and if missing print variable name for plots}

View file

@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_plots.R % Please edit documentation in R/plot-helpers.R
\name{get_plot_options} \name{get_plot_options}
\alias{get_plot_options} \alias{get_plot_options}
\title{Get the function options based on the selected function description} \title{Get the function options based on the selected function description}

View file

@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_plots.R % Please edit documentation in R/plot-helpers.R
\name{line_break} \name{line_break}
\alias{line_break} \alias{line_break}
\title{Line breaking at given number of characters for nicely plotting labels} \title{Line breaking at given number of characters for nicely plotting labels}

View file

@ -4,7 +4,7 @@
\alias{plot_euler_single} \alias{plot_euler_single}
\title{Easily plot single euler diagrams} \title{Easily plot single euler diagrams}
\usage{ \usage{
plot_euler_single(data, color.palette = "viridis") plot_euler_single(data, color.palette = "viridis", ...)
} }
\value{ \value{
ggplot2 object ggplot2 object

View file

@ -1,10 +1,10 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_plots.R % Please edit documentation in R/plot-helpers.R
\name{possible_plots} \name{possible_plots}
\alias{possible_plots} \alias{possible_plots}
\title{Get possible regression models} \title{Get possible regression models}
\usage{ \usage{
possible_plots(data) possible_plots(data, source_list = supported_plots())
} }
\arguments{ \arguments{
\item{data}{data} \item{data}{data}

View file

@ -0,0 +1,11 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-helpers.R
\name{selectPlotVariables}
\alias{selectPlotVariables}
\title{Wrapper for columnSelectInput}
\usage{
selectPlotVariables(data, exclude = NULL, allow_none = TRUE, var_types, ...)
}
\description{
Wrapper for columnSelectInput
}

View file

@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_plots.R % Please edit documentation in R/plot-helpers.R
\name{subset_types} \name{subset_types}
\alias{subset_types} \alias{subset_types}
\title{Easily subset by data type function} \title{Easily subset by data type function}

View file

@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_plots.R % Please edit documentation in R/plot-helpers.R
\name{supported_plots} \name{supported_plots}
\alias{supported_plots} \alias{supported_plots}
\title{Implemented functions} \title{Implemented functions}

View file

@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_plots.R % Please edit documentation in R/plot-helpers.R
\name{wrap_plot_list} \name{wrap_plot_list}
\alias{wrap_plot_list} \alias{wrap_plot_list}
\title{Wrapping} \title{Wrapping}