mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
version bump - regression - data overview
This commit is contained in:
parent
f73af16ae1
commit
f249aaa9ab
29 changed files with 2888 additions and 1239 deletions
27
examples/correlations_module_demo.R
Normal file
27
examples/correlations_module_demo.R
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#' Correlations plot demo app
|
||||
#'
|
||||
#' @returns shiny app
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' \dontrun{
|
||||
#' cor_demo_app()
|
||||
#' }
|
||||
cor_demo_app <- function() {
|
||||
ui <- shiny::fluidPage(
|
||||
shiny::sliderInput(
|
||||
inputId = "cor_cutoff",
|
||||
label = "Correlation cut-off",
|
||||
min = 0,
|
||||
max = 1,
|
||||
step = .1,
|
||||
value = .7,
|
||||
ticks = FALSE
|
||||
),
|
||||
data_correlations_ui("data", height = 600)
|
||||
)
|
||||
server <- function(input, output, session) {
|
||||
data_correlations_server("data", data = shiny::reactive(default_parsing(mtcars)), cutoff = shiny::reactive(input$cor_cutoff))
|
||||
}
|
||||
shiny::shinyApp(ui, server)
|
||||
}
|
||||
44
examples/download_module_demo.R
Normal file
44
examples/download_module_demo.R
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#' Download demo
|
||||
#'
|
||||
#' @returns
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' \dontrun{
|
||||
#' download_demo_app()
|
||||
#' }
|
||||
download_demo_app <- function() {
|
||||
ui <- bslib::page_fixed(
|
||||
bslib::nav_panel(
|
||||
title = "test",
|
||||
bslib::navset_bar(
|
||||
sidebar = bslib::sidebar(
|
||||
bslib::accordion(
|
||||
do.call(
|
||||
bslib::accordion_panel,
|
||||
c(
|
||||
list(
|
||||
value = "acc_download",
|
||||
title = "Download",
|
||||
icon = bsicons::bs_icon("download")
|
||||
),
|
||||
plot_download_ui("regression")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
server <- function(input, output, session) {
|
||||
plot_download_server(
|
||||
id = "regression",
|
||||
data = {
|
||||
lm(mpg ~ ., default_parsing(mtcars)) |>
|
||||
gtsummary::tbl_regression() |>
|
||||
plot(colour = "variable")
|
||||
}
|
||||
)
|
||||
}
|
||||
shiny::shinyApp(ui, server)
|
||||
}
|
||||
21
examples/regression_module_demo.R
Normal file
21
examples/regression_module_demo.R
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#' Regression module
|
||||
#'
|
||||
#' @returns
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' \dontrun{
|
||||
#' regression_demo_app()
|
||||
#' }
|
||||
regression_demo_app <- function() {
|
||||
ui <- bslib::page_fixed(
|
||||
do.call(
|
||||
bslib::navset_bar,
|
||||
regression_ui("regression")
|
||||
)
|
||||
)
|
||||
server <- function(input, output, session) {
|
||||
regression_server("regression", data = default_parsing(mtcars[1:3]))
|
||||
}
|
||||
shiny::shinyApp(ui, server)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue