mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
new renders
This commit is contained in:
parent
5ca751d3ea
commit
ab3df0eda6
22 changed files with 97 additions and 38 deletions
|
|
@ -1,6 +1,6 @@
|
|||
Package: FreesearchR
|
||||
Title: Easy data analysis for clinicians
|
||||
Version: 26.4.2
|
||||
Version: 26.5.1
|
||||
Authors@R: c(
|
||||
person("Andreas Gammelgaard", "Damsbo",email="agdamsbo@clin.au.dk", role = c("aut", "cre"),
|
||||
comment = c(ORCID = "0000-0002-7559-1154")),
|
||||
|
|
@ -118,6 +118,7 @@ Collate:
|
|||
'launch_FreesearchR.R'
|
||||
'missings-module.R'
|
||||
'plot-download-module.R'
|
||||
'plot-helpers.R'
|
||||
'plot_bar.R'
|
||||
'plot_box.R'
|
||||
'plot_euler.R'
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ export(append_column)
|
|||
export(append_list)
|
||||
export(apply_labels)
|
||||
export(argsstring2list)
|
||||
export(available_plots)
|
||||
export(baseline_table)
|
||||
export(class_icons)
|
||||
export(clean_common_axis)
|
||||
|
|
@ -64,6 +65,7 @@ export(format_writer)
|
|||
export(generate_colors)
|
||||
export(get_data_packages)
|
||||
export(get_fun_options)
|
||||
export(get_input_params)
|
||||
export(get_label)
|
||||
export(get_list_elements)
|
||||
export(get_plot_options)
|
||||
|
|
|
|||
4
NEWS.md
4
NEWS.md
|
|
@ -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
|
||||
|
||||
Bug fixes and revised color choices.
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
hosted_version <- function()'v26.4.2-260528'
|
||||
hosted_version <- function()'v26.4.2-260530'
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ vertical_stacked_bars <- function(data,
|
|||
|
||||
colors <- generate_colors(n = nrow(df.table), palette = color.palette)
|
||||
## Colors are reversed by default as that usually gives the best result
|
||||
if (isTRUE(reverse)) {
|
||||
if (isTRUE(reverse) | reverse=="TRUE") {
|
||||
colors <- rev(colors)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,6 @@
|
|||
"and","og"
|
||||
"from each pair","fra hvert par"
|
||||
"Plot","Tegn"
|
||||
"Adjust settings, then press ""Plot"".","Juster indstillingerne og tryk så ""Tegn""."
|
||||
"Plot height (mm)","Højde af grafik (mm)"
|
||||
"Plot width (mm)","Bredde af grafik (mm)"
|
||||
"File format","File format"
|
||||
|
|
@ -97,12 +96,7 @@
|
|||
"Select variable","Vælg variabel"
|
||||
"Response variable","Svarvariable"
|
||||
"Plot type","Type af grafik"
|
||||
"Please select","Vælg"
|
||||
"Additional variables","Yderligere variabler"
|
||||
"Secondary variable","Sekundær 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.."
|
||||
"#Plotting\n","#Tegner\n"
|
||||
"Stacked horizontal bars","Stablede horisontale søjler"
|
||||
|
|
@ -310,7 +304,6 @@
|
|||
"Sample data","Sample data"
|
||||
"Settings","Settings"
|
||||
"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')"
|
||||
"Drop empty","Drop empty"
|
||||
"Choose variable:","Choose variable:"
|
||||
|
|
|
|||
|
|
|
@ -89,7 +89,6 @@
|
|||
"and","na"
|
||||
"from each pair","kutoka kwa kila jozi"
|
||||
"Plot","Kipande cha habari"
|
||||
"Adjust settings, then press ""Plot"".","Rekebisha mipangilio, kisha bonyeza ""Plot""."
|
||||
"Plot height (mm)","Urefu wa kiwanja (mm)"
|
||||
"Plot width (mm)","Upana wa kiwanja (mm)"
|
||||
"File format","Umbizo la faili"
|
||||
|
|
@ -97,12 +96,7 @@
|
|||
"Select variable","Chagua kigezo"
|
||||
"Response variable","Kigezo cha majibu"
|
||||
"Plot type","Aina ya kiwanja"
|
||||
"Please select","Tafadhali chagua"
|
||||
"Additional variables","Vigezo vya ziada"
|
||||
"Secondary variable","Kigezo cha pili"
|
||||
"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.."
|
||||
"#Plotting\n","#Upangaji\n"
|
||||
"Stacked horizontal bars","Pau za mlalo zilizopangwa kwa mpangilio"
|
||||
|
|
@ -310,7 +304,6 @@
|
|||
"Sample data","Sample data"
|
||||
"Settings","Settings"
|
||||
"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')"
|
||||
"Drop empty","Drop empty"
|
||||
"Choose variable:","Choose variable:"
|
||||
|
|
|
|||
|
|
|
@ -1,5 +1,5 @@
|
|||
% 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}
|
||||
\alias{align_axes}
|
||||
\title{Aligns axes between plots}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
% 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}
|
||||
\alias{all_but}
|
||||
\title{Select all from vector but}
|
||||
|
|
|
|||
27
man/available_plots.Rd
Normal file
27
man/available_plots.Rd
Normal 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()
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
% 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}
|
||||
\alias{clean_common_axis}
|
||||
\title{Extract and clean axis ranges}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/data_plots.R, R/plot_bar.R, R/plot_box.R,
|
||||
% R/plot_hbar.R, R/plot_likert.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-helpers.R, R/plot_bar.R,
|
||||
% R/plot_box.R, R/plot_hbar.R, R/plot_likert.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}
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
\usage{
|
||||
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", ...)
|
||||
|
||||
|
|
@ -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_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", ...)
|
||||
|
||||
|
|
@ -69,12 +69,13 @@ plot_sankey(
|
|||
default.color = "#2986cc",
|
||||
box.color = "#1E4B66",
|
||||
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{
|
||||
\item{id}{Module id. (Use 'ns("id")')}
|
||||
|
|
|
|||
27
man/get_input_params.Rd
Normal file
27
man/get_input_params.Rd
Normal 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()
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
% 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}
|
||||
\alias{get_label}
|
||||
\title{Print label, and if missing print variable name for plots}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
% 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}
|
||||
\alias{get_plot_options}
|
||||
\title{Get the function options based on the selected function description}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
% 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}
|
||||
\alias{line_break}
|
||||
\title{Line breaking at given number of characters for nicely plotting labels}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
\alias{plot_euler_single}
|
||||
\title{Easily plot single euler diagrams}
|
||||
\usage{
|
||||
plot_euler_single(data, color.palette = "viridis")
|
||||
plot_euler_single(data, color.palette = "viridis", ...)
|
||||
}
|
||||
\value{
|
||||
ggplot2 object
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
% 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}
|
||||
\alias{possible_plots}
|
||||
\title{Get possible regression models}
|
||||
\usage{
|
||||
possible_plots(data)
|
||||
possible_plots(data, source_list = supported_plots())
|
||||
}
|
||||
\arguments{
|
||||
\item{data}{data}
|
||||
|
|
|
|||
11
man/selectPlotVariables.Rd
Normal file
11
man/selectPlotVariables.Rd
Normal 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
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
% 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}
|
||||
\alias{subset_types}
|
||||
\title{Easily subset by data type function}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
% 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}
|
||||
\alias{supported_plots}
|
||||
\title{Implemented functions}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
% 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}
|
||||
\alias{wrap_plot_list}
|
||||
\title{Wrapping}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue