mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
This commit is contained in:
parent
0feee4f02b
commit
f73af16ae1
10 changed files with 69 additions and 17 deletions
|
|
@ -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)
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue