updated docs
Some checks failed
pkgdown.yaml / pkgdown (push) Has been cancelled

This commit is contained in:
Andreas Gammelgaard Damsbo 2025-03-31 14:37:28 +02:00
parent 0feee4f02b
commit f73af16ae1
No known key found for this signature in database
10 changed files with 69 additions and 17 deletions

View file

@ -14,6 +14,7 @@ export(clean_date)
export(clean_sep) export(clean_sep)
export(columnSelectInput) export(columnSelectInput)
export(contrast_text) export(contrast_text)
export(cor_demo_app)
export(create_baseline) export(create_baseline)
export(create_log_tics) export(create_log_tics)
export(create_overview_datagrid) export(create_overview_datagrid)

View file

@ -1 +1 @@
app_version <- function()'250326_1206' app_version <- function()'250331_1248'

View file

@ -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() { cor_demo_app <- function() {
ui <- shiny::fluidPage( ui <- shiny::fluidPage(
shiny::sliderInput( shiny::sliderInput(
@ -152,4 +161,3 @@ cor_demo_app <- function() {
shiny::shinyApp(ui, server) shiny::shinyApp(ui, server)
} }
cor_demo_app()

View file

@ -342,3 +342,24 @@ data_description <- function(data) {
signif(100 * p_complete, 3) 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
}
}

View file

@ -91,7 +91,7 @@ merge_long <- function(list, model.names) {
setNames(d, gsub("_[0-9]{,}$", "", names(d))) setNames(d, gsub("_[0-9]{,}$", "", names(d)))
}) |> }) |>
dplyr::bind_rows() |> dplyr::bind_rows() |>
dplyr::mutate(model = as_factor(model)) dplyr::mutate(model = REDCapCAST::as_factor(model))
l_merged$table_body <- df_body_long l_merged$table_body <- df_body_long

View file

@ -52,8 +52,7 @@ gg_theme_shiny <- function(){
legend.title = ggplot2::element_text(size = 18), legend.title = ggplot2::element_text(size = 18),
legend.text = ggplot2::element_text(size = 14), legend.text = ggplot2::element_text(size = 14),
plot.title = ggplot2::element_text(size = 24), plot.title = ggplot2::element_text(size = 24),
plot.subtitle = ggplot2::element_text(size = 18), plot.subtitle = ggplot2::element_text(size = 18)
legend.position = "none"
) )
} }

View file

@ -10,7 +10,7 @@
#### Current file: R//app_version.R #### 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() { cor_demo_app <- function() {
ui <- shiny::fluidPage( ui <- shiny::fluidPage(
shiny::sliderInput( shiny::sliderInput(
@ -308,7 +317,6 @@ cor_demo_app <- function() {
shiny::shinyApp(ui, server) shiny::shinyApp(ui, server)
} }
cor_demo_app()
######## ########
@ -5417,7 +5425,7 @@ merge_long <- function(list, model.names) {
setNames(d, gsub("_[0-9]{,}$", "", names(d))) setNames(d, gsub("_[0-9]{,}$", "", names(d)))
}) |> }) |>
dplyr::bind_rows() |> dplyr::bind_rows() |>
dplyr::mutate(model = as_factor(model)) dplyr::mutate(model = REDCapCAST::as_factor(model))
l_merged$table_body <- df_body_long l_merged$table_body <- df_body_long
@ -5781,8 +5789,7 @@ gg_theme_shiny <- function(){
legend.title = ggplot2::element_text(size = 18), legend.title = ggplot2::element_text(size = 18),
legend.text = ggplot2::element_text(size = 14), legend.text = ggplot2::element_text(size = 14),
plot.title = ggplot2::element_text(size = 24), plot.title = ggplot2::element_text(size = 24),
plot.subtitle = ggplot2::element_text(size = 18), plot.subtitle = ggplot2::element_text(size = 18)
legend.position = "none"
) )
} }
@ -8541,9 +8548,9 @@ server <- function(input, output, session) {
alt = "Regression coefficient plot" alt = "Regression coefficient plot"
) )
shiny::conditionalPanel( # shiny::conditionalPanel(
condition = "output.uploaded == 'yes'", # condition = "output.uploaded == 'yes'",
) # )
############################################################################## ##############################################################################
######### #########

View file

@ -5,6 +5,6 @@ account: agdamsbo
server: shinyapps.io server: shinyapps.io
hostUrl: https://api.shinyapps.io/v1 hostUrl: https://api.shinyapps.io/v1
appId: 13611288 appId: 13611288
bundleId: 9994404 bundleId: 10005865
url: https://agdamsbo.shinyapps.io/freesearcheR/ url: https://agdamsbo.shinyapps.io/freesearcheR/
version: 1 version: 1

View file

@ -844,9 +844,9 @@ server <- function(input, output, session) {
alt = "Regression coefficient plot" alt = "Regression coefficient plot"
) )
shiny::conditionalPanel( # shiny::conditionalPanel(
condition = "output.uploaded == 'yes'", # condition = "output.uploaded == 'yes'",
) # )
############################################################################## ##############################################################################
######### #########

16
man/cor_demo_app.Rd Normal file
View 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()
}
}