mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-09-12 01:49:39 +02:00
This commit is contained in:
parent
0feee4f02b
commit
f73af16ae1
10 changed files with 69 additions and 17 deletions
|
@ -14,6 +14,7 @@ export(clean_date)
|
|||
export(clean_sep)
|
||||
export(columnSelectInput)
|
||||
export(contrast_text)
|
||||
export(cor_demo_app)
|
||||
export(create_baseline)
|
||||
export(create_log_tics)
|
||||
export(create_overview_datagrid)
|
||||
|
|
|
@ -1 +1 @@
|
|||
app_version <- function()'250326_1206'
|
||||
app_version <- function()'250331_1248'
|
||||
|
|
|
@ -133,6 +133,15 @@ sentence_paste <- function(data, and.str = "and") {
|
|||
}
|
||||
|
||||
|
||||
#' Correlations plot demo app
|
||||
#'
|
||||
#' @returns
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' \dontrun{
|
||||
#' cor_demo_app()
|
||||
#' }
|
||||
cor_demo_app <- function() {
|
||||
ui <- shiny::fluidPage(
|
||||
shiny::sliderInput(
|
||||
|
@ -152,4 +161,3 @@ cor_demo_app <- function() {
|
|||
shiny::shinyApp(ui, server)
|
||||
}
|
||||
|
||||
cor_demo_app()
|
||||
|
|
21
R/helpers.R
21
R/helpers.R
|
@ -342,3 +342,24 @@ data_description <- function(data) {
|
|||
signif(100 * p_complete, 3)
|
||||
)
|
||||
}
|
||||
|
||||
#' Drop-in replacement for the base::sort_by with option to remove NAs
|
||||
#'
|
||||
#' @param x x
|
||||
#' @param y y
|
||||
#' @param na.rm remove NAs
|
||||
#' @param ... passed to base_sort_by
|
||||
#'
|
||||
#' @returns
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' sort_by(c("Multivariable", "Univariable"),c("Univariable","Minimal","Multivariable"))
|
||||
sort_by <- function(x,y,na.rm=FALSE,...){
|
||||
out <- base::sort_by(x,y,...)
|
||||
if (na.rm==TRUE){
|
||||
out[!is.na(out)]
|
||||
} else {
|
||||
out
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ merge_long <- function(list, model.names) {
|
|||
setNames(d, gsub("_[0-9]{,}$", "", names(d)))
|
||||
}) |>
|
||||
dplyr::bind_rows() |>
|
||||
dplyr::mutate(model = as_factor(model))
|
||||
dplyr::mutate(model = REDCapCAST::as_factor(model))
|
||||
|
||||
l_merged$table_body <- df_body_long
|
||||
|
||||
|
|
|
@ -52,8 +52,7 @@ gg_theme_shiny <- function(){
|
|||
legend.title = ggplot2::element_text(size = 18),
|
||||
legend.text = ggplot2::element_text(size = 14),
|
||||
plot.title = ggplot2::element_text(size = 24),
|
||||
plot.subtitle = ggplot2::element_text(size = 18),
|
||||
legend.position = "none"
|
||||
plot.subtitle = ggplot2::element_text(size = 18)
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#### Current file: R//app_version.R
|
||||
########
|
||||
|
||||
app_version <- function()'250326_1206'
|
||||
app_version <- function()'250331_1248'
|
||||
|
||||
|
||||
########
|
||||
|
@ -289,6 +289,15 @@ sentence_paste <- function(data, and.str = "and") {
|
|||
}
|
||||
|
||||
|
||||
#' Correlations plot demo app
|
||||
#'
|
||||
#' @returns
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' \dontrun{
|
||||
#' cor_demo_app()
|
||||
#' }
|
||||
cor_demo_app <- function() {
|
||||
ui <- shiny::fluidPage(
|
||||
shiny::sliderInput(
|
||||
|
@ -308,7 +317,6 @@ cor_demo_app <- function() {
|
|||
shiny::shinyApp(ui, server)
|
||||
}
|
||||
|
||||
cor_demo_app()
|
||||
|
||||
|
||||
########
|
||||
|
@ -5417,7 +5425,7 @@ merge_long <- function(list, model.names) {
|
|||
setNames(d, gsub("_[0-9]{,}$", "", names(d)))
|
||||
}) |>
|
||||
dplyr::bind_rows() |>
|
||||
dplyr::mutate(model = as_factor(model))
|
||||
dplyr::mutate(model = REDCapCAST::as_factor(model))
|
||||
|
||||
l_merged$table_body <- df_body_long
|
||||
|
||||
|
@ -5781,8 +5789,7 @@ gg_theme_shiny <- function(){
|
|||
legend.title = ggplot2::element_text(size = 18),
|
||||
legend.text = ggplot2::element_text(size = 14),
|
||||
plot.title = ggplot2::element_text(size = 24),
|
||||
plot.subtitle = ggplot2::element_text(size = 18),
|
||||
legend.position = "none"
|
||||
plot.subtitle = ggplot2::element_text(size = 18)
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -8541,9 +8548,9 @@ server <- function(input, output, session) {
|
|||
alt = "Regression coefficient plot"
|
||||
)
|
||||
|
||||
shiny::conditionalPanel(
|
||||
condition = "output.uploaded == 'yes'",
|
||||
)
|
||||
# shiny::conditionalPanel(
|
||||
# condition = "output.uploaded == 'yes'",
|
||||
# )
|
||||
|
||||
##############################################################################
|
||||
#########
|
||||
|
|
|
@ -5,6 +5,6 @@ account: agdamsbo
|
|||
server: shinyapps.io
|
||||
hostUrl: https://api.shinyapps.io/v1
|
||||
appId: 13611288
|
||||
bundleId: 9994404
|
||||
bundleId: 10005865
|
||||
url: https://agdamsbo.shinyapps.io/freesearcheR/
|
||||
version: 1
|
||||
|
|
|
@ -844,9 +844,9 @@ server <- function(input, output, session) {
|
|||
alt = "Regression coefficient plot"
|
||||
)
|
||||
|
||||
shiny::conditionalPanel(
|
||||
condition = "output.uploaded == 'yes'",
|
||||
)
|
||||
# shiny::conditionalPanel(
|
||||
# condition = "output.uploaded == 'yes'",
|
||||
# )
|
||||
|
||||
##############################################################################
|
||||
#########
|
||||
|
|
16
man/cor_demo_app.Rd
Normal file
16
man/cor_demo_app.Rd
Normal file
|
@ -0,0 +1,16 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/correlations-module.R
|
||||
\name{cor_demo_app}
|
||||
\alias{cor_demo_app}
|
||||
\title{Correlations plot demo app}
|
||||
\usage{
|
||||
cor_demo_app()
|
||||
}
|
||||
\description{
|
||||
Correlations plot demo app
|
||||
}
|
||||
\examples{
|
||||
\dontrun{
|
||||
cor_demo_app()
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue