mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
organising plotting functions - nicer plot wrapping - merge mulitple workbook sheets
This commit is contained in:
parent
efc3f8acc3
commit
49016a4aa8
20 changed files with 1615 additions and 910 deletions
|
|
@ -1,25 +1,19 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/correlations-module.R, R/data_plots.R
|
||||
% Please edit documentation in R/correlations-module.R
|
||||
\name{data-correlations}
|
||||
\alias{data-correlations}
|
||||
\alias{data_correlations_ui}
|
||||
\alias{data_correlations_server}
|
||||
\alias{data_visuals_ui}
|
||||
\alias{data_visuals_server}
|
||||
\title{Data correlations evaluation module}
|
||||
\usage{
|
||||
data_correlations_ui(id, ...)
|
||||
|
||||
data_correlations_server(id, data, include.class = NULL, cutoff = 0.7, ...)
|
||||
|
||||
data_visuals_ui(id, tab_title = "Plots", ...)
|
||||
|
||||
data_visuals_server(id, data, ...)
|
||||
}
|
||||
\arguments{
|
||||
\item{id}{Module id. (Use 'ns("id")')}
|
||||
|
||||
\item{...}{ignored}
|
||||
\item{...}{arguments passed to toastui::datagrid}
|
||||
|
||||
\item{data}{data}
|
||||
|
||||
|
|
@ -30,14 +24,8 @@ data_visuals_server(id, data, ...)
|
|||
\value{
|
||||
Shiny ui module
|
||||
|
||||
shiny server module
|
||||
|
||||
Shiny ui module
|
||||
|
||||
shiny server module
|
||||
}
|
||||
\description{
|
||||
Data correlations evaluation module
|
||||
|
||||
Data correlations evaluation module
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,47 +1,56 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/data_plots.R, R/plot_sankey.R
|
||||
% Please edit documentation in R/data_plots.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{plot_ridge}
|
||||
\alias{data_visuals_ui}
|
||||
\alias{data_visuals_server}
|
||||
\alias{create_plot}
|
||||
\alias{plot_hbars}
|
||||
\alias{plot_violin}
|
||||
\alias{plot_scatter}
|
||||
\alias{plot_ridge}
|
||||
\alias{sankey_ready}
|
||||
\alias{plot_sankey}
|
||||
\title{Plot nice ridge plot}
|
||||
\alias{plot_scatter}
|
||||
\alias{plot_violin}
|
||||
\title{Data correlations evaluation module}
|
||||
\usage{
|
||||
plot_ridge(data, x, y, z = NULL, ...)
|
||||
data_visuals_ui(id, tab_title = "Plots", ...)
|
||||
|
||||
data_visuals_server(id, data, ...)
|
||||
|
||||
create_plot(data, type, x, y, z = NULL, ...)
|
||||
|
||||
plot_hbars(data, x, y, z = NULL)
|
||||
|
||||
plot_violin(data, x, y, z = NULL)
|
||||
|
||||
plot_scatter(data, x, y, z = NULL)
|
||||
plot_ridge(data, x, y, z = NULL, ...)
|
||||
|
||||
sankey_ready(data, x, y, numbers = "count", ...)
|
||||
|
||||
plot_sankey(data, x, y, z = NULL, color.group = "x", colors = NULL)
|
||||
|
||||
plot_scatter(data, x, y, z = NULL)
|
||||
|
||||
plot_violin(data, x, y, z = NULL)
|
||||
}
|
||||
\arguments{
|
||||
\item{id}{Module id. (Use 'ns("id")')}
|
||||
|
||||
\item{...}{ignored for now}
|
||||
|
||||
\item{data}{data.frame}
|
||||
|
||||
\item{type}{plot type (derived from possible_plots() and matches custom function)}
|
||||
|
||||
\item{x}{primary variable}
|
||||
|
||||
\item{y}{secondary variable}
|
||||
|
||||
\item{z}{tertiary variable}
|
||||
|
||||
\item{...}{ignored for now}
|
||||
|
||||
\item{type}{plot type (derived from possible_plots() and matches custom function)}
|
||||
}
|
||||
\value{
|
||||
ggplot2 object
|
||||
Shiny ui module
|
||||
|
||||
ggplot2 object
|
||||
shiny server module
|
||||
|
||||
ggplot2 object
|
||||
|
||||
|
|
@ -51,33 +60,37 @@ ggplot2 object
|
|||
|
||||
data.frame
|
||||
|
||||
ggplot2 object
|
||||
|
||||
ggplot2 object
|
||||
|
||||
ggplot2 object
|
||||
}
|
||||
\description{
|
||||
Plot nice ridge plot
|
||||
Data correlations evaluation module
|
||||
|
||||
Wrapper to create plot based on provided type
|
||||
|
||||
Nice horizontal stacked bars (Grotta bars)
|
||||
|
||||
Beatiful violin plot
|
||||
|
||||
Beautiful violin plot
|
||||
Plot nice ridge plot
|
||||
|
||||
Readying data for sankey plot
|
||||
|
||||
Beautiful sankey plot with option to split by a tertiary group
|
||||
|
||||
Beautiful violin plot
|
||||
|
||||
Beatiful violin plot
|
||||
}
|
||||
\examples{
|
||||
create_plot(mtcars, "plot_violin", "mpg", "cyl")
|
||||
mtcars |> plot_hbars(x = "carb", y = "cyl")
|
||||
mtcars |> plot_hbars(x = "carb", y = NULL)
|
||||
mtcars |>
|
||||
default_parsing() |>
|
||||
plot_ridge(x = "mpg", y = "cyl")
|
||||
mtcars |> plot_ridge(x = "mpg", y = "cyl", z = "gear")
|
||||
create_plot(mtcars, "plot_violin", "mpg", "cyl")
|
||||
mtcars |> plot_hbars(x = "carb", y = "cyl")
|
||||
mtcars |> plot_hbars(x = "carb", y = NULL)
|
||||
mtcars |> plot_violin(x = "mpg", y = "cyl", z = "gear")
|
||||
mtcars |> plot_scatter(x = "mpg", y = "wt")
|
||||
ds <- data.frame(g = sample(LETTERS[1:2], 100, TRUE), first = REDCapCAST::as_factor(sample(letters[1:4], 100, TRUE)), last = sample(c(letters[1:4], NA), 100, TRUE, prob = c(rep(.23, 4), .08)))
|
||||
ds |> sankey_ready("first", "last")
|
||||
ds |> sankey_ready("first", "last", numbers = "percentage")
|
||||
|
|
@ -91,4 +104,6 @@ ds <- data.frame(g = sample(LETTERS[1:2], 100, TRUE), first = REDCapCAST::as_fac
|
|||
ds |> plot_sankey("first", "last")
|
||||
ds |> plot_sankey("first", "last", color.group = "y")
|
||||
ds |> plot_sankey("first", "last", z = "g", color.group = "y")
|
||||
mtcars |> plot_scatter(x = "mpg", y = "wt")
|
||||
mtcars |> plot_violin(x = "mpg", y = "cyl", z = "gear")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
\usage{
|
||||
import_file_ui(
|
||||
id,
|
||||
title = TRUE,
|
||||
title = "",
|
||||
preview_data = TRUE,
|
||||
file_extensions = c(".csv", ".txt", ".xls", ".xlsx", ".rds", ".fst", ".sas7bdat",
|
||||
".sav"),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
\alias{redcap_demo_app}
|
||||
\title{Shiny module to browser and export REDCap data}
|
||||
\usage{
|
||||
m_redcap_readUI(id, include_title = TRUE)
|
||||
m_redcap_readUI(id, title = TRUE)
|
||||
|
||||
m_redcap_readServer(id)
|
||||
|
||||
|
|
|
|||
|
|
@ -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_hbar.R
|
||||
\name{vertical_stacked_bars}
|
||||
\alias{vertical_stacked_bars}
|
||||
\title{Vertical stacked bar plot wrapper}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue